patches/uClibc/0.9.30.2/150-LT-pthread_atfork-unhide.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Aug 02 18:26:53 2011 +0200 (2011-08-02)
changeset 2592 4908eb2b6f17
permissions -rw-r--r--
scripts/functions: cvs retrieval first tries the mirror for tarballs

The cvs download helper looks for the local tarballs dir to see if it
can find a pre-downloaded tarball, and if it does not find it, does
the actual fetch to upstream via cvs.

In the process, it does not even try to get a tarball from the local
mirror, which can be useful if the mirror has been pre-populated
manually (or with a previously downloaded tree).

Fake a tarball get with the standard tarball-download helper, but
without specifying any upstream URL, which makes the helper directly
try the LAN mirror.

Of course, if no mirror is specified, no URL wil be available, and
the standard cvs retrieval will kick in.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 From a05c4380c5aaa6e107a4c7e1e5a139ec4cc43f0c Mon Sep 17 00:00:00 2001
     2 From: Henning Heinold <heinold@inf.fu-berlin.de>
     3 Date: Sun, 21 Feb 2010 11:55:32 +0100
     4 Subject: [PATCH 14/15] LT pthread_atfork: unhide
     5 
     6 Trying to compile perl with uClibc new linuxthreads on arm.
     7 I run into the problem that pthread_atfork is not available.
     8 The problem was that it was synced with the glibc version, which has
     9 compat ifdefs we do not need in uClibc. The inital checked in version
    10 is right and works. So either revert the commit 2 years ago
    11 or patch it with the patch attached I made for openembedded.
    12 
    13 Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
    14 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
    15 ---
    16  libpthread/linuxthreads/Makefile.in      |    2 +-
    17  libpthread/linuxthreads/pthread_atfork.c |   13 +++----------
    18  2 files changed, 4 insertions(+), 11 deletions(-)
    19 
    20 diff --git a/libpthread/linuxthreads/Makefile.in b/libpthread/linuxthreads/Makefile.in
    21 index 947dea9..d53b5fa 100644
    22 --- a/libpthread/linuxthreads/Makefile.in
    23 +++ b/libpthread/linuxthreads/Makefile.in
    24 @@ -45,7 +45,7 @@ pthread_sysdep_SRC := $(patsubst %,$(libpthread_DIR)/sysdeps/pthread/%.c,$(pthre
    25  pthread_SRC := \
    26  	attr barrier cancel condvar errno events join pthread \
    27  	lockfile manager mutex pt-machine ptcleanup \
    28 -	ptclock_gettime ptclock_settime ptfork pthandles \
    29 +	ptclock_gettime ptclock_settime ptfork pthandles pthread_atfork \
    30  	pthread_setegid pthread_seteuid pthread_setgid pthread_setregid \
    31  	pthread_setresgid pthread_setresuid pthread_setreuid pthread_setuid \
    32  	rwlock semaphore sighandler signals specific spinlock
    33 diff --git a/libpthread/linuxthreads/pthread_atfork.c b/libpthread/linuxthreads/pthread_atfork.c
    34 index 2464acb..4c83dd0 100644
    35 --- a/libpthread/linuxthreads/pthread_atfork.c
    36 +++ b/libpthread/linuxthreads/pthread_atfork.c
    37 @@ -43,12 +43,8 @@ extern void *__dso_handle __attribute__ ((__weak__));
    38  
    39  /* Hide the symbol so that no definition but the one locally in the
    40     executable or DSO is used.  */
    41 -int
    42 -#ifndef __pthread_atfork
    43 -/* Don't mark the compatibility function as hidden.  */
    44 -attribute_hidden
    45 -#endif
    46 -__pthread_atfork (prepare, parent, child)
    47 +
    48 +int attribute_hidden __pthread_atfork (prepare, parent, child)
    49       void (*prepare) (void);
    50       void (*parent) (void);
    51       void (*child) (void);
    52 @@ -56,8 +52,5 @@ __pthread_atfork (prepare, parent, child)
    53    return __register_atfork (prepare, parent, child,
    54  			    &__dso_handle == NULL ? NULL : __dso_handle);
    55  }
    56 -#ifndef __pthread_atfork
    57 -extern int pthread_atfork (void (*prepare) (void), void (*parent) (void),
    58 -			   void (*child) (void)) attribute_hidden;
    59 +
    60  strong_alias (__pthread_atfork, pthread_atfork)
    61 -#endif
    62 -- 
    63 1.6.6.1
    64