Skip to content
Commit 0af86465 authored by DengChao's avatar DengChao Committed by John Stultz
Browse files

ntp: Change time_reftime to time64_t and utilize 64bit __ktime_get_real_seconds



The type of static variant "time_reftime" and the call of
get_seconds in ntp are both not y2038 safe.

So change the type of time_reftime to time64_t and replace
get_seconds with __ktime_get_real_seconds.

The local variant "secs" in ntp_update_offset represents
seconds between now and last ntp adjustment, it seems impossible
that this time will last more than 68 years, so keep its type as
"long".

Reviewed-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarDengChao <chao.deng@linaro.org>
[jstultz: Tweaked commit message]
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
parent dee36654
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment