summaryrefslogtreecommitdiff
path: root/patches/uClibc/0.9.30.2/150-LT-pthread_atfork-unhide.patch
blob: dfe4567e126dc6b73c30c1c0dbe90fb3f7420022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
From a05c4380c5aaa6e107a4c7e1e5a139ec4cc43f0c Mon Sep 17 00:00:00 2001
From: Henning Heinold <heinold@inf.fu-berlin.de>
Date: Sun, 21 Feb 2010 11:55:32 +0100
Subject: [PATCH 14/15] LT pthread_atfork: unhide

Trying to compile perl with uClibc new linuxthreads on arm.
I run into the problem that pthread_atfork is not available.
The problem was that it was synced with the glibc version, which has
compat ifdefs we do not need in uClibc. The inital checked in version
is right and works. So either revert the commit 2 years ago
or patch it with the patch attached I made for openembedded.

Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
---
 libpthread/linuxthreads/Makefile.in      |    2 +-
 libpthread/linuxthreads/pthread_atfork.c |   13 +++----------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/libpthread/linuxthreads/Makefile.in b/libpthread/linuxthreads/Makefile.in
index 947dea9..d53b5fa 100644
--- a/libpthread/linuxthreads/Makefile.in
+++ b/libpthread/linuxthreads/Makefile.in
@@ -45,7 +45,7 @@ pthread_sysdep_SRC := $(patsubst %,$(libpthread_DIR)/sysdeps/pthread/%.c,$(pthre
 pthread_SRC := \
 	attr barrier cancel condvar errno events join pthread \
 	lockfile manager mutex pt-machine ptcleanup \
-	ptclock_gettime ptclock_settime ptfork pthandles \
+	ptclock_gettime ptclock_settime ptfork pthandles pthread_atfork \
 	pthread_setegid pthread_seteuid pthread_setgid pthread_setregid \
 	pthread_setresgid pthread_setresuid pthread_setreuid pthread_setuid \
 	rwlock semaphore sighandler signals specific spinlock
diff --git a/libpthread/linuxthreads/pthread_atfork.c b/libpthread/linuxthreads/pthread_atfork.c
index 2464acb..4c83dd0 100644
--- a/libpthread/linuxthreads/pthread_atfork.c
+++ b/libpthread/linuxthreads/pthread_atfork.c
@@ -43,12 +43,8 @@ extern void *__dso_handle __attribute__ ((__weak__));
 
 /* Hide the symbol so that no definition but the one locally in the
    executable or DSO is used.  */
-int
-#ifndef __pthread_atfork
-/* Don't mark the compatibility function as hidden.  */
-attribute_hidden
-#endif
-__pthread_atfork (prepare, parent, child)
+
+int attribute_hidden __pthread_atfork (prepare, parent, child)
      void (*prepare) (void);
      void (*parent) (void);
      void (*child) (void);
@@ -56,8 +52,5 @@ __pthread_atfork (prepare, parent, child)
   return __register_atfork (prepare, parent, child,
 			    &__dso_handle == NULL ? NULL : __dso_handle);
 }
-#ifndef __pthread_atfork
-extern int pthread_atfork (void (*prepare) (void), void (*parent) (void),
-			   void (*child) (void)) attribute_hidden;
+
 strong_alias (__pthread_atfork, pthread_atfork)
-#endif
-- 
1.6.6.1