Browse Source

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>
Khem Raj 12 years ago
parent
commit
bf6f131313
1 changed files with 10 additions and 2 deletions
  1. 10 2
      libpthread/nptl/pthread_atfork.c

+ 10 - 2
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