about summary refs log tree commit diff
path: root/sysdeps/unix/clock_nanosleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/clock_nanosleep.c')
-rw-r--r--sysdeps/unix/clock_nanosleep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/clock_nanosleep.c b/sysdeps/unix/clock_nanosleep.c
index 7662d1704e..6b170fd702 100644
--- a/sysdeps/unix/clock_nanosleep.c
+++ b/sysdeps/unix/clock_nanosleep.c
@@ -26,7 +26,7 @@
 #if HP_TIMING_AVAIL
 # define CPUCLOCK_P(clock) \
   ((clock) == CLOCK_PROCESS_CPUTIME_ID					      \
-   || (clock) == CLOCK_THREAD_CPUTIME_ID)
+   || ((clock) & ((1 << CLOCK_IDFIELD_SIZE) - 1)) == CLOCK_THREAD_CPUTIME_ID)
 #else
 # define CPUCLOCK_P(clock) 0
 #endif