--- linuxthreads/sysdeps/pthread/bits/libc-lock.h | 8 ++++++++ 1 file changed, 8 insertions(+) --- a/linuxthreads/sysdeps/pthread/bits/libc-lock.h +++ b/linuxthreads/sysdeps/pthread/bits/libc-lock.h @@ -25,6 +25,10 @@ #if defined _LIBC && !defined NOT_IN_libc #include +#else +/* This function is called to initialize the pthread library. */ +/* We need a prototype before it is bellow marked as weak */ +extern void __pthread_initialize (void); #endif /* Mutex type. */ @@ -379,8 +383,10 @@ weak_extern (__pthread_atfork) weak_extern (BP_SYM (_pthread_cleanup_push)) weak_extern (BP_SYM (_pthread_cleanup_pop)) +#ifdef __USE_GNU weak_extern (BP_SYM (_pthread_cleanup_push_defer)) weak_extern (BP_SYM (_pthread_cleanup_pop_restore)) +#endif # else # pragma weak __pthread_mutex_init # pragma weak __pthread_mutex_destroy @@ -402,8 +408,10 @@ # pragma weak __pthread_once # pragma weak __pthread_initialize # pragma weak __pthread_atfork +#ifdef __USE_GNU # pragma weak _pthread_cleanup_push_defer # pragma weak _pthread_cleanup_pop_restore +#endif # pragma weak _pthread_cleanup_push # pragma weak _pthread_cleanup_pop # endif