about summary refs log tree commit diff
path: root/nptl/nptl-init.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@hack.frob.com>2014-10-17 14:30:16 -0700
committerRoland McGrath <roland@hack.frob.com>2014-10-17 14:30:16 -0700
commit184ee94010786a9e0952aff3af39eba1d72287d3 (patch)
treeb7f4a680b4340f565951a599a6d86f88e61a1711 /nptl/nptl-init.c
parent327ae2570744dabf7f065a6b529d16cc22438603 (diff)
downloadglibc-184ee94010786a9e0952aff3af39eba1d72287d3.tar.gz
glibc-184ee94010786a9e0952aff3af39eba1d72287d3.tar.xz
glibc-184ee94010786a9e0952aff3af39eba1d72287d3.zip
NPTL: Conditionalize direct futex syscall uses.
Diffstat (limited to 'nptl/nptl-init.c')
-rw-r--r--nptl/nptl-init.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index d8154c4101..a39ec9a23d 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -329,7 +329,8 @@ __pthread_initialize_minimal_internal (void)
 #endif
     set_robust_list_not_avail ();
 
-#ifndef __ASSUME_PRIVATE_FUTEX
+#ifdef __NR_futex
+# ifndef __ASSUME_PRIVATE_FUTEX
   /* Private futexes are always used (at least internally) so that
      doing the test once this early is beneficial.  */
   {
@@ -345,8 +346,8 @@ __pthread_initialize_minimal_internal (void)
      know the former are not supported.  This also means we know the
      kernel will return ENOSYS for unknown operations.  */
   if (THREAD_GETMEM (pd, header.private_futex) != 0)
-#endif
-#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
+# endif
+# ifndef __ASSUME_FUTEX_CLOCK_REALTIME
     {
       int word = 0;
       /* NB: the syscall actually takes six parameters.  The last is the
@@ -361,6 +362,7 @@ __pthread_initialize_minimal_internal (void)
       if (INTERNAL_SYSCALL_ERRNO (word, err) != ENOSYS)
 	__set_futex_clock_realtime ();
     }
+# endif
 #endif
 
   /* Set initial thread's stack block from 0 up to __libc_stack_end.