Blame SOURCES/glibc-fedora-uname-getrlimit.patch

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