patches/uClibc/0.9.30.2/150-LT-pthread_atfork-unhide.patch
changeset 1819 66fcfb3d6745
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/uClibc/0.9.30.2/150-LT-pthread_atfork-unhide.patch	Sun Feb 28 11:50:15 2010 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +From a05c4380c5aaa6e107a4c7e1e5a139ec4cc43f0c Mon Sep 17 00:00:00 2001
     1.5 +From: Henning Heinold <heinold@inf.fu-berlin.de>
     1.6 +Date: Sun, 21 Feb 2010 11:55:32 +0100
     1.7 +Subject: [PATCH 14/15] LT pthread_atfork: unhide
     1.8 +
     1.9 +Trying to compile perl with uClibc new linuxthreads on arm.
    1.10 +I run into the problem that pthread_atfork is not available.
    1.11 +The problem was that it was synced with the glibc version, which has
    1.12 +compat ifdefs we do not need in uClibc. The inital checked in version
    1.13 +is right and works. So either revert the commit 2 years ago
    1.14 +or patch it with the patch attached I made for openembedded.
    1.15 +
    1.16 +Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
    1.17 +Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
    1.18 +---
    1.19 + libpthread/linuxthreads/Makefile.in      |    2 +-
    1.20 + libpthread/linuxthreads/pthread_atfork.c |   13 +++----------
    1.21 + 2 files changed, 4 insertions(+), 11 deletions(-)
    1.22 +
    1.23 +diff --git a/libpthread/linuxthreads/Makefile.in b/libpthread/linuxthreads/Makefile.in
    1.24 +index 947dea9..d53b5fa 100644
    1.25 +--- a/libpthread/linuxthreads/Makefile.in
    1.26 ++++ b/libpthread/linuxthreads/Makefile.in
    1.27 +@@ -45,7 +45,7 @@ pthread_sysdep_SRC := $(patsubst %,$(libpthread_DIR)/sysdeps/pthread/%.c,$(pthre
    1.28 + pthread_SRC := \
    1.29 + 	attr barrier cancel condvar errno events join pthread \
    1.30 + 	lockfile manager mutex pt-machine ptcleanup \
    1.31 +-	ptclock_gettime ptclock_settime ptfork pthandles \
    1.32 ++	ptclock_gettime ptclock_settime ptfork pthandles pthread_atfork \
    1.33 + 	pthread_setegid pthread_seteuid pthread_setgid pthread_setregid \
    1.34 + 	pthread_setresgid pthread_setresuid pthread_setreuid pthread_setuid \
    1.35 + 	rwlock semaphore sighandler signals specific spinlock
    1.36 +diff --git a/libpthread/linuxthreads/pthread_atfork.c b/libpthread/linuxthreads/pthread_atfork.c
    1.37 +index 2464acb..4c83dd0 100644
    1.38 +--- a/libpthread/linuxthreads/pthread_atfork.c
    1.39 ++++ b/libpthread/linuxthreads/pthread_atfork.c
    1.40 +@@ -43,12 +43,8 @@ extern void *__dso_handle __attribute__ ((__weak__));
    1.41 + 
    1.42 + /* Hide the symbol so that no definition but the one locally in the
    1.43 +    executable or DSO is used.  */
    1.44 +-int
    1.45 +-#ifndef __pthread_atfork
    1.46 +-/* Don't mark the compatibility function as hidden.  */
    1.47 +-attribute_hidden
    1.48 +-#endif
    1.49 +-__pthread_atfork (prepare, parent, child)
    1.50 ++
    1.51 ++int attribute_hidden __pthread_atfork (prepare, parent, child)
    1.52 +      void (*prepare) (void);
    1.53 +      void (*parent) (void);
    1.54 +      void (*child) (void);
    1.55 +@@ -56,8 +52,5 @@ __pthread_atfork (prepare, parent, child)
    1.56 +   return __register_atfork (prepare, parent, child,
    1.57 + 			    &__dso_handle == NULL ? NULL : __dso_handle);
    1.58 + }
    1.59 +-#ifndef __pthread_atfork
    1.60 +-extern int pthread_atfork (void (*prepare) (void), void (*parent) (void),
    1.61 +-			   void (*child) (void)) attribute_hidden;
    1.62 ++
    1.63 + strong_alias (__pthread_atfork, pthread_atfork)
    1.64 +-#endif
    1.65 +-- 
    1.66 +1.6.6.1
    1.67 +