uClibc 0.9.32: fix infinite recursion on application exit triggered by linking libc...
[openwrt/svn-archive/archive.git] / toolchain / uClibc / patches-0.9.32 / 180-pthread_cleanup_fix.patch
1 --- a/libpthread/nptl/cleanup_defer_compat.c
2 +++ b/libpthread/nptl/cleanup_defer_compat.c
3 @@ -22,7 +22,7 @@
4
5 void
6 attribute_protected
7 -_pthread_cleanup_push_defer (
8 +__pthread_cleanup_push_defer (
9 struct _pthread_cleanup_buffer *buffer,
10 void (*routine) (void *),
11 void *arg)
12 @@ -57,12 +57,12 @@ _pthread_cleanup_push_defer (
13
14 THREAD_SETMEM (self, cleanup, buffer);
15 }
16 -strong_alias (_pthread_cleanup_push_defer, __pthread_cleanup_push_defer)
17 +strong_alias (__pthread_cleanup_push_defer, _pthread_cleanup_push_defer)
18
19
20 void
21 attribute_protected
22 -_pthread_cleanup_pop_restore (
23 +__pthread_cleanup_pop_restore (
24 struct _pthread_cleanup_buffer *buffer,
25 int execute)
26 {
27 @@ -97,4 +97,4 @@ _pthread_cleanup_pop_restore (
28 if (execute)
29 buffer->__routine (buffer->__arg);
30 }
31 -strong_alias (_pthread_cleanup_pop_restore, __pthread_cleanup_pop_restore)
32 +strong_alias (__pthread_cleanup_pop_restore, _pthread_cleanup_pop_restore)
33 --- a/libpthread/nptl/init.c
34 +++ b/libpthread/nptl/init.c
35 @@ -112,8 +112,8 @@ static const struct pthread_functions pt
36 .ptr___pthread_key_create = __pthread_key_create_internal,
37 .ptr___pthread_getspecific = __pthread_getspecific_internal,
38 .ptr___pthread_setspecific = __pthread_setspecific_internal,
39 - .ptr__pthread_cleanup_push_defer = _pthread_cleanup_push_defer,
40 - .ptr__pthread_cleanup_pop_restore = _pthread_cleanup_pop_restore,
41 + .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer,
42 + .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore,
43 .ptr_nthreads = &__nptl_nthreads,
44 .ptr___pthread_unwind = &__pthread_unwind,
45 .ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd,