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