y2038: lib/cobalt/clock: dispatch clock_adjtime
PATCH 2/3 y2038: lib/cobalt/clock: dispatch clock_adjtime
If sizeof time_t bigger than 4, which means glibc supports 64bit timespec, go to clock_adjtime64.
otherwise, go to original clock_adjtime.
Signed-off-by Song Chen <[email protected]>
--- lib/cobalt/clock.c | 5 +++++ 1 file changed, 5 insertions(+)
lib/cobalt/clock.c +5 -0
@@ -313,7 +313,12 @@ COBALT_IMPL(int, clock_adjtime, (clockid_t clock_id, struct timex *tx)) {int ret; +#ifdef __USE_TIME_BITS64 + ret = -XENOMAI_SYSCALL2 (sc_cobalt_clock_adjtime64, clock_id, tx); +#else ret = -XENOMAI_SYSCALL2 (sc_cobalt_clock_adjtime, clock_id, tx); +#endif +if (ret <0 ) { errno = ret;return -1 ;
Signature · 1 line
2.7.4