fa3bfd
Related upstream commit:
29e444
fa3bfd
commit c5c2b7c3fd823fc5c4a52506292a90eba60b0c62
fa3bfd
Author: Joseph Myers <joseph@codesourcery.com>
fa3bfd
Date:   Sat Dec 6 23:40:48 2014 +0000
29e444
fa3bfd
    Fix pthreads getrlimit, gettimeofday namespace (bug 17682).
fa3bfd
fa3bfd
The uname call is again present in Fedora because UTS namespaces can
fa3bfd
be used nowadays to change the uname result.
29e444
12745e
--- glibc-2.17-c758a686/nptl/Version
12745e
+++ glibc-2.17-c758a686/nptl/Versions
29e444
@@ -30,6 +30,7 @@ libc {
29e444
     __libc_alloca_cutoff;
29e444
     # Internal libc interface to libpthread
29e444
     __libc_dl_error_tsd;
29e444
+    __getrlimit;
29e444
   }
29e444
 }
29e444
 
12745e
--- glibc-2.17-c758a686/nptl/nptl-init.c
12745e
+++ glibc-2.17-c758a686/nptl/nptl-init.c
29e444
@@ -414,7 +414,7 @@ __pthread_initialize_minimal_internal (void)
29e444
   /* Determine the default allowed stack size.  This is the size used
29e444
      in case the user does not specify one.  */
29e444
   struct rlimit limit;
29e444
-  if (getrlimit (RLIMIT_STACK, &limit) != 0
29e444
+  if (__getrlimit (RLIMIT_STACK, &limit) != 0
29e444
       || limit.rlim_cur == RLIM_INFINITY)
29e444
     /* The system limit is not usable.  Use an architecture-specific
29e444
        default.  */
12745e
--- glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/Versions
12745e
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/Versions
29e444
@@ -0,0 +1,6 @@
29e444
+libc {
29e444
+  GLIBC_PRIVATE {
29e444
+    # Internal libc interface to libpthread
29e444
+    __uname;
29e444
+  }
29e444
+}
12745e
--- glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/smp.h
12745e
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/smp.h
29e444
@@ -36,7 +36,7 @@ is_smp_system (void)
29e444
   char *cp;
29e444
 
29e444
   /* Try reading the number using `sysctl' first.  */
29e444
-  if (uname (&u.uts) == 0)
29e444
+  if (__uname (&u.uts) == 0)
29e444
     cp = u.uts.version;
29e444
   else
29e444
     {