arrfab / rpms / glibc

Forked from rpms/glibc 4 years ago
Clone
Blob Blame History Raw
Related upstream commit:

commit c5c2b7c3fd823fc5c4a52506292a90eba60b0c62
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Sat Dec 6 23:40:48 2014 +0000

    Fix pthreads getrlimit, gettimeofday namespace (bug 17682).

The uname call is again present in Fedora because UTS namespaces can
be used nowadays to change the uname result.

--- glibc-2.17-c758a686/nptl/Version
+++ glibc-2.17-c758a686/nptl/Versions
@@ -30,6 +30,7 @@ libc {
     __libc_alloca_cutoff;
     # Internal libc interface to libpthread
     __libc_dl_error_tsd;
+    __getrlimit;
   }
 }
 
--- glibc-2.17-c758a686/nptl/nptl-init.c
+++ glibc-2.17-c758a686/nptl/nptl-init.c
@@ -414,7 +414,7 @@ __pthread_initialize_minimal_internal (void)
   /* Determine the default allowed stack size.  This is the size used
      in case the user does not specify one.  */
   struct rlimit limit;
-  if (getrlimit (RLIMIT_STACK, &limit) != 0
+  if (__getrlimit (RLIMIT_STACK, &limit) != 0
       || limit.rlim_cur == RLIM_INFINITY)
     /* The system limit is not usable.  Use an architecture-specific
        default.  */
--- glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/Versions
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/Versions
@@ -0,0 +1,6 @@
+libc {
+  GLIBC_PRIVATE {
+    # Internal libc interface to libpthread
+    __uname;
+  }
+}
--- glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/smp.h
+++ glibc-2.17-c758a686/nptl/sysdeps/unix/sysv/linux/i386/smp.h
@@ -36,7 +36,7 @@ is_smp_system (void)
   char *cp;
 
   /* Try reading the number using `sysctl' first.  */
-  if (uname (&u.uts) == 0)
+  if (__uname (&u.uts) == 0)
     cp = u.uts.version;
   else
     {