]> git.ipfire.org Git - thirdparty/chrony.git/commit
sys_timex: fix update of TAI offset on non-Linux systems
authorMiroslav Lichvar <mlichvar@redhat.com>
Mon, 10 Jul 2017 13:51:06 +0000 (15:51 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 11 Jul 2017 09:28:34 +0000 (11:28 +0200)
commit760285218f2dc0a86da23b059ab0ef1b5b0e0f03
tree82074ab3a053fdcde0da83ec764ae92a365b0f27
parent4fe0e6b7fd8b1e201314ca0308626f40fedf2d3f
sys_timex: fix update of TAI offset on non-Linux systems

The tai field in struct timex is a Linux-specific feature. It's possible
to read the current offset with ntp_gettime() (or ntp_gettimex() on
Linux), but apparently not all libc implementations support it.

Rework the code to save and adjust the last value instead of reading
the current value from the kernel.
sys_timex.c