[RFC,09/12] y2038: Convert __xclock_gettime to be Y2038 safe
Commit Message
The clock_gettime has been replaced with Y2038 safe __clock_gettime64.
Morevoer, the struct timespec has been replaced with struct __timespec64.
---
support/xclock_gettime.c | 4 ++--
support/xtime.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
@@ -21,9 +21,9 @@
#include <support/xthread.h>
void
-__xclock_gettime (clockid_t clockid, struct timespec *ts)
+__xclock_gettime (clockid_t clockid, struct __timespec64 *ts)
{
- const int ret = clock_gettime (clockid, ts);
+ const int ret = __clock_gettime64 (clockid, ts);
if (ret < 0)
FAIL_EXIT1 ("clock_gettime (%d): %m",
clockid);
@@ -27,7 +27,7 @@ __BEGIN_DECLS
/* The following functions call the corresponding libc functions and
terminate the process on error. */
-void __xclock_gettime (clockid_t clock, struct timespec *ts);
+void __xclock_gettime (clockid_t clock, struct __timespec64 *ts);
/* This helper can often simplify tests by avoiding an explicit
variable declaration or allowing that declaration to be const. */