fb633e
From cde99cd2b7b16a6113acb054e89d490047932a9f Mon Sep 17 00:00:00 2001
fb633e
From: Andreas Schwab <schwab@redhat.com>
fb633e
Date: Thu, 8 Apr 2010 11:18:26 +0200
fb633e
Subject: [PATCH] Don't call uname or getrlimit in libpthread init function
fb633e
fb633e
* sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
fb633e
GLIBC_PRIVATE.
fb633e
* nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
fb633e
* sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
fb633e
* nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
fb633e
fb633e
---
fb633e
 ChangeLog                                  |    8 ++++++++
fb633e
 nptl/Versions                              |    1 +
fb633e
 nptl/nptl-init.c                           |    2 +-
Siddhesh Poyarekar 25cc20
 sysdeps/unix/sysv/linux/i386/Versions |    6 ++++++
Siddhesh Poyarekar 25cc20
 sysdeps/unix/sysv/linux/i386/smp.h    |    2 +-
fb633e
 5 files changed, 17 insertions(+), 2 deletions(-)
Siddhesh Poyarekar 25cc20
 create mode 100644 sysdeps/unix/sysv/linux/i386/Versions
fb633e
fb633e
--- a/nptl/Version
fb633e
+++ b/nptl/Versions
fb633e
@@ -30,6 +30,7 @@ libc {
Siddhesh Poyarekar 1ea305
     __libc_pthread_init;
Siddhesh Poyarekar 1ea305
     __libc_current_sigrtmin_private; __libc_current_sigrtmax_private;
Siddhesh Poyarekar 1ea305
     __libc_allocate_rtsig_private;
fb633e
+    __getrlimit;
fb633e
   }
fb633e
 }
fb633e
 
Siddhesh Poyarekar 25cc20
--- a/sysdeps/unix/sysv/linux/i386/Versions
Siddhesh Poyarekar 25cc20
+++ b/sysdeps/unix/sysv/linux/i386/Versions
Siddhesh Poyarekar 25cc20
@@ -53,5 +53,6 @@
Siddhesh Poyarekar 25cc20
   }
Siddhesh Poyarekar 25cc20
   GLIBC_PRIVATE {
Siddhesh Poyarekar 25cc20
     __modify_ldt;
fb633e
+    __uname;
Siddhesh Poyarekar 25cc20
   }
Siddhesh Poyarekar 25cc20
 }
Siddhesh Poyarekar 25cc20
--- a/sysdeps/unix/sysv/linux/i386/smp.h
Siddhesh Poyarekar 25cc20
+++ b/sysdeps/unix/sysv/linux/i386/smp.h
fb633e
@@ -36,7 +36,7 @@ is_smp_system (void)
fb633e
   char *cp;
fb633e
 
fb633e
   /* Try reading the number using `sysctl' first.  */
fb633e
-  if (uname (&u.uts) == 0)
fb633e
+  if (__uname (&u.uts) == 0)
fb633e
     cp = u.uts.version;
fb633e
   else
fb633e
     {