Skip to contentSkip to conversation

y2038: lib/cobalt/clock: dispatch clock_adjtime

PATCH In review Song Chen 1 participant 1 message Apr 29, 2021

lore
Share & tools
lore

Song Chen

author
#0 lore raw

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.

---
 lib/cobalt/clock.c | 5 +++++
 1 file changed, 5 insertions(+)
lib/cobalt/clock.c +5 -0
index 3045563..41751a8 100644
@@ -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