180-pthread_cleanup_fix.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. --- a/libpthread/nptl/cleanup_defer_compat.c
  2. +++ b/libpthread/nptl/cleanup_defer_compat.c
  3. @@ -22,7 +22,7 @@
  4. void
  5. attribute_protected
  6. -_pthread_cleanup_push_defer (
  7. +__pthread_cleanup_push_defer (
  8. struct _pthread_cleanup_buffer *buffer,
  9. void (*routine) (void *),
  10. void *arg)
  11. @@ -57,12 +57,12 @@ _pthread_cleanup_push_defer (
  12. THREAD_SETMEM (self, cleanup, buffer);
  13. }
  14. -strong_alias (_pthread_cleanup_push_defer, __pthread_cleanup_push_defer)
  15. +strong_alias (__pthread_cleanup_push_defer, _pthread_cleanup_push_defer)
  16. void
  17. attribute_protected
  18. -_pthread_cleanup_pop_restore (
  19. +__pthread_cleanup_pop_restore (
  20. struct _pthread_cleanup_buffer *buffer,
  21. int execute)
  22. {
  23. @@ -97,4 +97,4 @@ _pthread_cleanup_pop_restore (
  24. if (execute)
  25. buffer->__routine (buffer->__arg);
  26. }
  27. -strong_alias (_pthread_cleanup_pop_restore, __pthread_cleanup_pop_restore)
  28. +strong_alias (__pthread_cleanup_pop_restore, _pthread_cleanup_pop_restore)
  29. --- a/libpthread/nptl/init.c
  30. +++ b/libpthread/nptl/init.c
  31. @@ -112,8 +112,8 @@ static const struct pthread_functions pt
  32. .ptr___pthread_key_create = __pthread_key_create_internal,
  33. .ptr___pthread_getspecific = __pthread_getspecific_internal,
  34. .ptr___pthread_setspecific = __pthread_setspecific_internal,
  35. - .ptr__pthread_cleanup_push_defer = _pthread_cleanup_push_defer,
  36. - .ptr__pthread_cleanup_pop_restore = _pthread_cleanup_pop_restore,
  37. + .ptr__pthread_cleanup_push_defer = __pthread_cleanup_push_defer,
  38. + .ptr__pthread_cleanup_pop_restore = __pthread_cleanup_pop_restore,
  39. .ptr_nthreads = &__nptl_nthreads,
  40. .ptr___pthread_unwind = &__pthread_unwind,
  41. .ptr__nptl_deallocate_tsd = __nptl_deallocate_tsd,