From: chensong <[email protected]> If sizeof time_t bigger than 4, which means glibc supports 64bit timespec, go to clock_settime64.
otherwise, go to original clock_settime. Signed-off-by: chensong <[email protected]> Reviewed-by: Florian Bezdeka <[email protected]> --- lib/cobalt/clock.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/cobalt/clock.c b/lib/cobalt/clock.c index 21a66ddcf..16081c86e 100644 --- a/lib/cobalt/clock.c +++ b/lib/cobalt/clock.c @@ -285,7 +285,11 @@ COBALT_IMPL(int, clock_settime, (clockid_t clock_id, const struct timespec *tp)) if (clock_id == CLOCK_REALTIME && !cobalt_use_legacy_tsc()) return __STD(clock_settime(CLOCK_REALTIME, tp)); +#ifdef __USE_TIME_BITS64 + ret = -XENOMAI_SYSCALL2(sc_cobalt_clock_settime64, clock_id, tp); +#else ret = -XENOMAI_SYSCALL2(sc_cobalt_clock_settime, clock_id, tp); +#endif if (ret) { errno = ret; return -1; -- 2.31.1
