]> git.ipfire.org Git - ipfire-3.x.git/blob - glibc/patches/glibc-fedora-uname-getrlimit.patch
glibc: Update to 2.20
[ipfire-3.x.git] / glibc / patches / glibc-fedora-uname-getrlimit.patch
1 From cde99cd2b7b16a6113acb054e89d490047932a9f Mon Sep 17 00:00:00 2001
2 From: Andreas Schwab <schwab@redhat.com>
3 Date: Thu, 8 Apr 2010 11:18:26 +0200
4 Subject: [PATCH] Don't call uname or getrlimit in libpthread init function
5
6 * sysdeps/unix/sysv/linux/i386/Versions: Export __uname under
7 GLIBC_PRIVATE.
8 * nptl/Versions: Export __getrlimit under GLIBC_PRIVATE.
9 * sysdeps/unix/sysv/linux/i386/smp.h: Call __uname instead of uname.
10 * nptl/nptl-init.c: Call __getrlimit instead of getrlimit.
11
12 ---
13 ChangeLog | 8 ++++++++
14 nptl/Versions | 1 +
15 nptl/nptl-init.c | 2 +-
16 sysdeps/unix/sysv/linux/i386/Versions | 6 ++++++
17 sysdeps/unix/sysv/linux/i386/smp.h | 2 +-
18 5 files changed, 17 insertions(+), 2 deletions(-)
19 create mode 100644 sysdeps/unix/sysv/linux/i386/Versions
20
21 --- a/nptl/Version
22 +++ b/nptl/Versions
23 @@ -30,6 +30,7 @@ libc {
24 __libc_pthread_init;
25 __libc_current_sigrtmin_private; __libc_current_sigrtmax_private;
26 __libc_allocate_rtsig_private;
27 + __getrlimit;
28 }
29 }
30
31 --- a/nptl/nptl-init.c
32 +++ b/nptl/nptl-init.c
33 @@ -414,7 +414,7 @@ __pthread_initialize_minimal_internal (void)
34 /* Determine the default allowed stack size. This is the size used
35 in case the user does not specify one. */
36 struct rlimit limit;
37 - if (getrlimit (RLIMIT_STACK, &limit) != 0
38 + if (__getrlimit (RLIMIT_STACK, &limit) != 0
39 || limit.rlim_cur == RLIM_INFINITY)
40 /* The system limit is not usable. Use an architecture-specific
41 default. */
42 --- a/sysdeps/unix/sysv/linux/i386/Versions
43 +++ b/sysdeps/unix/sysv/linux/i386/Versions
44 @@ -53,5 +53,6 @@
45 }
46 GLIBC_PRIVATE {
47 __modify_ldt;
48 + __uname;
49 }
50 }
51 --- a/sysdeps/unix/sysv/linux/i386/smp.h
52 +++ b/sysdeps/unix/sysv/linux/i386/smp.h
53 @@ -36,7 +36,7 @@ is_smp_system (void)
54 char *cp;
55
56 /* Try reading the number using `sysctl' first. */
57 - if (uname (&u.uts) == 0)
58 + if (__uname (&u.uts) == 0)
59 cp = u.uts.version;
60 else
61 {