PageRenderTime 47ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/patches/uClibc/0.9.30.2/150-LT-pthread_atfork-unhide.patch

https://bitbucket.org/xdpcx/crosstool-ng-dlang
Patch | 64 lines | 59 code | 5 blank | 0 comment | 0 complexity | 6aa090f17a90cc014ffab528a3f95736 MD5 | raw file
Possible License(s): LGPL-2.1, GPL-2.0
  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. Trying to compile perl with uClibc new linuxthreads on arm.
  6. I run into the problem that pthread_atfork is not available.
  7. The problem was that it was synced with the glibc version, which has
  8. compat ifdefs we do not need in uClibc. The inital checked in version
  9. is right and works. So either revert the commit 2 years ago
  10. or patch it with the patch attached I made for openembedded.
  11. Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
  12. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
  13. ---
  14. libpthread/linuxthreads/Makefile.in | 2 +-
  15. libpthread/linuxthreads/pthread_atfork.c | 13 +++----------
  16. 2 files changed, 4 insertions(+), 11 deletions(-)
  17. diff --git a/libpthread/linuxthreads/Makefile.in b/libpthread/linuxthreads/Makefile.in
  18. index 947dea9..d53b5fa 100644
  19. --- a/libpthread/linuxthreads/Makefile.in
  20. +++ b/libpthread/linuxthreads/Makefile.in
  21. @@ -45,7 +45,7 @@ pthread_sysdep_SRC := $(patsubst %,$(libpthread_DIR)/sysdeps/pthread/%.c,$(pthre
  22. pthread_SRC := \
  23. attr barrier cancel condvar errno events join pthread \
  24. lockfile manager mutex pt-machine ptcleanup \
  25. - ptclock_gettime ptclock_settime ptfork pthandles \
  26. + ptclock_gettime ptclock_settime ptfork pthandles pthread_atfork \
  27. pthread_setegid pthread_seteuid pthread_setgid pthread_setregid \
  28. pthread_setresgid pthread_setresuid pthread_setreuid pthread_setuid \
  29. rwlock semaphore sighandler signals specific spinlock
  30. diff --git a/libpthread/linuxthreads/pthread_atfork.c b/libpthread/linuxthreads/pthread_atfork.c
  31. index 2464acb..4c83dd0 100644
  32. --- a/libpthread/linuxthreads/pthread_atfork.c
  33. +++ b/libpthread/linuxthreads/pthread_atfork.c
  34. @@ -43,12 +43,8 @@ extern void *__dso_handle __attribute__ ((__weak__));
  35. /* Hide the symbol so that no definition but the one locally in the
  36. executable or DSO is used. */
  37. -int
  38. -#ifndef __pthread_atfork
  39. -/* Don't mark the compatibility function as hidden. */
  40. -attribute_hidden
  41. -#endif
  42. -__pthread_atfork (prepare, parent, child)
  43. +
  44. +int attribute_hidden __pthread_atfork (prepare, parent, child)
  45. void (*prepare) (void);
  46. void (*parent) (void);
  47. void (*child) (void);
  48. @@ -56,8 +52,5 @@ __pthread_atfork (prepare, parent, child)
  49. return __register_atfork (prepare, parent, child,
  50. &__dso_handle == NULL ? NULL : __dso_handle);
  51. }
  52. -#ifndef __pthread_atfork
  53. -extern int pthread_atfork (void (*prepare) (void), void (*parent) (void),
  54. - void (*child) (void)) attribute_hidden;
  55. +
  56. strong_alias (__pthread_atfork, pthread_atfork)
  57. -#endif
  58. --
  59. 1.6.6.1