From: chensong <[email protected]> If sizeof time_t bigger than 4, which means glibc supports 64bit timespec, go to clock_gettime64.
otherwise, go to original clock_settime. Signed-off-by: chensong <[email protected]> [Florian: Rebased on top of next] Signed-off-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 3f87278ce..21a66ddcf 100644 --- a/lib/cobalt/clock.c +++ b/lib/cobalt/clock.c @@ -151,7 +151,11 @@ static int __do_clock_host_realtime(struct timespec *ts) static int __do_clock_gettime(clockid_t clock_id, struct timespec *tp) { +#ifdef __USE_TIME_BITS64 + return -XENOMAI_SYSCALL2(sc_cobalt_clock_gettime64, clock_id, tp); +#else return -XENOMAI_SYSCALL2(sc_cobalt_clock_gettime, clock_id, tp); +#endif } static int gettime_via_tsc(clockid_t clock_id, struct timespec *tp) -- 2.31.1
