Browse Source

make sure we store the function pointers to the real push/pop functions rather than the public weak ones so that the libc->libpthread forwarding code is able to work properly

this should fix the case where libpthread.so is not linked directly, but rather via another library:
 app -> links to libfoo.so -> links to libpthread.so

and any function (like readdir_r) that does:
 __UCLIBC_MUTEX_LOCK()
 __UCLIBC_MUTEX_UNLOCK()
Mike Frysinger 17 years ago
parent
commit
fa8710bf5c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      libpthread/linuxthreads.old/pthread.c

+ 2 - 2
libpthread/linuxthreads.old/pthread.c

@@ -371,8 +371,8 @@ struct pthread_functions __pthread_functions =
     .ptr__pthread_cleanup_push = _pthread_cleanup_push,
     .ptr__pthread_cleanup_pop = _pthread_cleanup_pop
 */
-    .ptr__pthread_cleanup_push_defer = _pthread_cleanup_push_defer,
-    .ptr__pthread_cleanup_pop_restore = _pthread_cleanup_pop_restore,
+    .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer,
+    .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore,
   };
 #ifdef SHARED
 # define ptr_pthread_functions &__pthread_functions