summaryrefslogtreecommitdiff
path: root/libpthread/nptl
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2012-06-23 15:59:01 -0700
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-03-22 14:49:27 +0100
commitbf6f1313132a3d99d645ea8b6661c23d68235278 (patch)
treec997e7b1ae250b57d1d7f324d4e746da35bb2b85 /libpthread/nptl
parent5c3661fda947c1bc5e597be081c355b51c595794 (diff)
nptl/atfork: Hide pthread_atfork in shared versions
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libpthread/nptl')
-rw-r--r--libpthread/nptl/pthread_atfork.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libpthread/nptl/pthread_atfork.c b/libpthread/nptl/pthread_atfork.c
index 3c12cd470..39ac3e262 100644
--- a/libpthread/nptl/pthread_atfork.c
+++ b/libpthread/nptl/pthread_atfork.c
@@ -37,13 +37,17 @@
#include <fork.h>
/* This is defined by newer gcc version unique for each module. */
-extern void *__dso_handle __attribute__ ((__weak__));
- //,__visibility__ ("hidden")));
+extern void *__dso_handle __attribute__ ((__weak__,
+ __visibility__ ("hidden")));
/* 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 (
void (*prepare) (void),
void (*parent) (void),
@@ -52,4 +56,8 @@ __pthread_atfork (
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