summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads/condvar.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread/linuxthreads/condvar.c')
-rw-r--r--libpthread/linuxthreads/condvar.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libpthread/linuxthreads/condvar.c b/libpthread/linuxthreads/condvar.c
index 6ac1622da..01359ac83 100644
--- a/libpthread/linuxthreads/condvar.c
+++ b/libpthread/linuxthreads/condvar.c
@@ -18,6 +18,7 @@
#include <errno.h>
#include <sched.h>
#include <stddef.h>
+#include <string.h>
#include <sys/time.h>
#include "pthread.h"
#include "internals.h"
@@ -273,7 +274,7 @@ int pthread_cond_broadcast(pthread_cond_t *cond)
}
libpthread_hidden_def(pthread_cond_broadcast)
-int pthread_condattr_init(pthread_condattr_t *attr attribute_unused)
+int pthread_condattr_init(pthread_condattr_t *attr)
{
memset (attr, '\0', sizeof (*attr));
return 0;
@@ -328,7 +329,11 @@ int pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock_id)
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;
}