fix the new libpthread implementation - the function table init was broken
[openwrt/openwrt.git] / toolchain / uClibc / patches / 200-libpthread_fix.patch
1 --- a/libpthread/linuxthreads/libc-cancellation.c
2 +++ b/libpthread/linuxthreads/libc-cancellation.c
3 @@ -31,9 +31,6 @@
4 weak_extern (__pthread_do_exit)
5 # endif
6
7 -int __libc_multiple_threads attribute_hidden __attribute__((nocommon));
8 -strong_alias (__libc_multiple_threads, __librt_multiple_threads)
9 -
10 /* The next two functions are similar to pthread_setcanceltype() but
11 more specialized for the use in the cancelable functions like write().
12 They do not need to check parameters etc. */
13 --- a/libpthread/linuxthreads/libc_pthread_init.c
14 +++ b/libpthread/linuxthreads/libc_pthread_init.c
15 @@ -33,6 +33,9 @@ libc_hidden_proto(memcpy)
16 libc_hidden_proto(uselocale)
17 #endif
18
19 +int __libc_multiple_threads attribute_hidden __attribute__((nocommon));
20 +strong_alias (__libc_multiple_threads, __librt_multiple_threads)
21 +
22 int *
23 __libc_pthread_init (functions)
24 const struct pthread_functions *functions;
25 --- a/libpthread/linuxthreads/Makefile.in
26 +++ b/libpthread/linuxthreads/Makefile.in
27 @@ -77,7 +77,7 @@ libpthread-a-y += $(libpthread_OBJ:.o=.
28 else
29 libpthread-a-y += $(libpthread_OBJ) $(libpthread-static-y)
30 endif
31 -libpthread-so-y += $(libpthread_OBJ:.o=.os)
32 +libpthread-so-y += $(libpthread_OBJ:.o=.oS)
33
34 lib-a-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.a
35 lib-so-$(UCLIBC_HAS_THREADS) += $(top_builddir)lib/libpthread.so