diff options
Diffstat (limited to 'meta/recipes-core/uclibc/uclibc-git/0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch')
-rw-r--r-- | meta/recipes-core/uclibc/uclibc-git/0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/meta/recipes-core/uclibc/uclibc-git/0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch b/meta/recipes-core/uclibc/uclibc-git/0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch new file mode 100644 index 0000000000..297a40bd04 --- /dev/null +++ b/meta/recipes-core/uclibc/uclibc-git/0001-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch | |||
@@ -0,0 +1,74 @@ | |||
1 | From d021e6252b33e779857846714fb1899a25c9965d Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 23 Jun 2012 15:59:01 -0700 | ||
4 | Subject: [PATCH] nptl/atfork: Hide pthread_atfork in shared versions | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | Upstream-Status: Pending | ||
8 | --- | ||
9 | libpthread/nptl/Makefile.in | 4 +++- | ||
10 | libpthread/nptl/pthread_atfork.c | 12 ++++++++++-- | ||
11 | 2 files changed, 13 insertions(+), 3 deletions(-) | ||
12 | |||
13 | diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in | ||
14 | index 158bcae..3ef7175 100644 | ||
15 | --- a/libpthread/nptl/Makefile.in | ||
16 | +++ b/libpthread/nptl/Makefile.in | ||
17 | @@ -16,6 +16,7 @@ libc-shared-routines-y = forward.c libc-cancellation.c | ||
18 | libc-static-routines-y = alloca_cutoff.c libc-cancellation.c | ||
19 | libpthread-shared-only-routines-y = version.c | ||
20 | libpthread-static-only-routines-y = pthread_atfork.c | ||
21 | + | ||
22 | libpthread-routines- += $(notdir $(wildcard $(libpthread_DIR)/gen_*.c)) # dummy generated files | ||
23 | libpthread-routines- += allocatestack.c # dummy included by pthread_create.c | ||
24 | libpthread-routines- += pthread_mutex_getprioceiling.c pthread_mutex_setprioceiling.c # XXX: delete those or use them! | ||
25 | @@ -208,7 +209,7 @@ CFLAGS-msgsnd.c = -fexceptions -fasynchronous-unwind-tables | ||
26 | CFLAGS-tcdrain.c = -fexceptions -fasynchronous-unwind-tables | ||
27 | |||
28 | CFLAGS-pt-system.c = -fexceptions -I$(top_srcdir)libc/stdlib | ||
29 | - | ||
30 | +CFLAGS-pthread_atfork.c = -DNOT_IN_libc | ||
31 | # | ||
32 | # The rest of this file is uClibc specific. | ||
33 | # | ||
34 | @@ -224,3 +225,4 @@ CFLAGS-OMIT-alloca_cutoff.c = $(CFLAGS-nptl) | ||
35 | CFLAGS-OMIT-forward.c = $(CFLAGS-nptl) | ||
36 | CFLAGS-OMIT-libc-lowlevelock.c = $(CFLAGS-nptl) | ||
37 | CFLAGS-OMIT-libc-cancellation.c = $(CFLAGS-nptl) | ||
38 | + | ||
39 | diff --git a/libpthread/nptl/pthread_atfork.c b/libpthread/nptl/pthread_atfork.c | ||
40 | index e607d49..6224c17 100644 | ||
41 | --- a/libpthread/nptl/pthread_atfork.c | ||
42 | +++ b/libpthread/nptl/pthread_atfork.c | ||
43 | @@ -38,13 +38,17 @@ | ||
44 | #include <fork.h> | ||
45 | |||
46 | /* This is defined by newer gcc version unique for each module. */ | ||
47 | -extern void *__dso_handle __attribute__ ((__weak__)); | ||
48 | - //,__visibility__ ("hidden"))); | ||
49 | +extern void *__dso_handle __attribute__ ((__weak__, | ||
50 | + __visibility__ ("hidden"))); | ||
51 | |||
52 | |||
53 | /* Hide the symbol so that no definition but the one locally in the | ||
54 | executable or DSO is used. */ | ||
55 | int | ||
56 | +#ifndef __pthread_atfork | ||
57 | +/* Don't mark the compatibility function as hidden. */ | ||
58 | +attribute_hidden | ||
59 | +#endif | ||
60 | __pthread_atfork ( | ||
61 | void (*prepare) (void), | ||
62 | void (*parent) (void), | ||
63 | @@ -53,4 +57,8 @@ __pthread_atfork ( | ||
64 | return __register_atfork (prepare, parent, child, | ||
65 | &__dso_handle == NULL ? NULL : __dso_handle); | ||
66 | } | ||
67 | +#ifndef __pthread_atfork | ||
68 | +extern int pthread_atfork (void (*prepare) (void), void (*parent) (void), | ||
69 | + void (*child) (void)) attribute_hidden; | ||
70 | strong_alias (__pthread_atfork, pthread_atfork) | ||
71 | +#endif | ||
72 | -- | ||
73 | 1.7.9.5 | ||
74 | |||