summaryrefslogtreecommitdiff
path: root/libpthread/nptl/pthread_condattr_setclock.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/nptl/pthread_condattr_setclock.c')
-rw-r--r--libpthread/nptl/pthread_condattr_setclock.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpthread/nptl/pthread_condattr_setclock.c b/libpthread/nptl/pthread_condattr_setclock.c
index b2f4aaf29..e7f3539d6 100644
--- a/libpthread/nptl/pthread_condattr_setclock.c
+++ b/libpthread/nptl/pthread_condattr_setclock.c
@@ -35,7 +35,7 @@ pthread_condattr_setclock (
if (clock_id == CLOCK_MONOTONIC)
{
#ifndef __ASSUME_POSIX_TIMERS
-# ifdef __NR_clock_getres
+# if defined(__NR_clock_getres) || defined(__NR_clock_getres_time64)
/* Check whether the clock is available. */
static int avail;
@@ -45,7 +45,11 @@ pthread_condattr_setclock (
INTERNAL_SYSCALL_DECL (err);
int val;
+#if defined(__UCLIBC_USE_TIME64__) && defined(__NR_clock_getres_time64)
+ val = INTERNAL_SYSCALL (clock_getres_time64, err, 2, CLOCK_MONOTONIC, &ts);
+#else
val = INTERNAL_SYSCALL (clock_getres, err, 2, CLOCK_MONOTONIC, &ts);
+#endif
avail = INTERNAL_SYSCALL_ERROR_P (val, err) ? -1 : 1;
}