summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32/lowlevellock.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sparc/sparc32/lowlevellock.c')
-rw-r--r--sysdeps/sparc/sparc32/lowlevellock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdeps/sparc/sparc32/lowlevellock.c b/sysdeps/sparc/sparc32/lowlevellock.c
index 25f3e6b1a0..074ecf0636 100644
--- a/sysdeps/sparc/sparc32/lowlevellock.c
+++ b/sysdeps/sparc/sparc32/lowlevellock.c
@@ -21,6 +21,7 @@
 #include <sysdep.h>
 #include <lowlevellock.h>
 #include <sys/time.h>
+#include <time.h>
 
 
 void
@@ -56,7 +57,7 @@ __lll_clocklock_wait (int *futex, clockid_t clockid,
                       const struct timespec *abstime, int private)
 {
   /* Reject invalid timeouts.  */
-  if (abstime->tv_nsec < 0 || abstime->tv_nsec >= 1000000000)
+  if (! valid_nanoseconds (abstime->tv_nsec))
     return EINVAL;
 
   do