If sizeof time_t bigger than 4, which means glibc supports 64bit timespec, go to clock_nanosleep64.
otherwise, go to original clock_nanosleep. Signed-off-by: chensong <[email protected]> --- lib/cobalt/clock.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/cobalt/clock.c b/lib/cobalt/clock.c index e861413..b799e27 100644 --- a/lib/cobalt/clock.c +++ b/lib/cobalt/clock.c @@ -360,8 +360,13 @@ COBALT_IMPL(int, clock_nanosleep, (clockid_t clock_id, pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype); +#ifdef __USE_TIME_BITS64 + ret = -XENOMAI_SYSCALL4(sc_cobalt_clock_nanosleep64, + clock_id, flags, rqtp, rmtp); +#else ret = -XENOMAI_SYSCALL4(sc_cobalt_clock_nanosleep, clock_id, flags, rqtp, rmtp); +#endif pthread_setcanceltype(oldtype, NULL); -- 2.7.4
