summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-09-12 00:06:28 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-09-12 00:06:28 +0200
commitdf664a147963b28f53eb8f62ba79d98c1739fb74 (patch)
tree01b608d6770190489299ad259fe98841535ea9f0 /sysdeps
parent9295bc48dd22a8358a595b9cebffdfc09d4166cd (diff)
parent7ad3fdec85ef0b37d2ee1c69c5659d5ebe93f909 (diff)
Merge branch 'master' into master-glibc-2.21
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/pt-atfork.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/generic/pt-atfork.c b/sysdeps/generic/pt-atfork.c
index ce72e10..304d7ef 100644
--- a/sysdeps/generic/pt-atfork.c
+++ b/sysdeps/generic/pt-atfork.c
@@ -20,10 +20,14 @@
#include <pthread.h>
#include <pt-internal.h>
+/* This is defined by newer gcc version unique for each module. */
+extern void *__dso_handle __attribute__ ((__weak__,
+ __visibility__ ("hidden")));
+
int
pthread_atfork (void (*prepare) (void),
void (*parent) (void),
void (*child) (void))
{
- return __register_atfork (prepare, parent, child);
+ return __register_atfork (prepare, parent, child, &__dso_handle == NULL ? NULL : __dso_handle);
}