It does not actually need to be extern any more.
---
 htl/Versions            | 1 -
 htl/libc_pthread_init.c | 2 --
 htl/pt-cleanup.c        | 2 ++
 htl/pt-internal.h       | 3 ---
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/htl/Versions b/htl/Versions
index 2a83eb1b27..009c0d0e35 100644
--- a/htl/Versions
+++ b/htl/Versions
@@ -248,7 +248,6 @@ libc {
   GLIBC_PRIVATE {
     __libc_alloca_cutoff;
     __libc_pthread_init;
-    __pthread_cleanup_stack;
     __pthread_total;
     ___pthread_self;
     __pthread_alloc;
diff --git a/htl/libc_pthread_init.c b/htl/libc_pthread_init.c
index ca71af5d7a..b61a3a1d0a 100644
--- a/htl/libc_pthread_init.c
+++ b/htl/libc_pthread_init.c
@@ -19,8 +19,6 @@
 #include <string.h>
 #include <pthread-functions.h>
 
-__thread struct __pthread_cancelation_handler *__pthread_cleanup_stack;
-
 void
 __libc_pthread_init (const struct pthread_functions *functions)
 {
diff --git a/htl/pt-cleanup.c b/htl/pt-cleanup.c
index 76fdbe2918..054be1be4b 100644
--- a/htl/pt-cleanup.c
+++ b/htl/pt-cleanup.c
@@ -21,6 +21,8 @@
 #include <pt-internal.h>
 #include <shlib-compat.h>
 
+static __thread struct __pthread_cancelation_handler *__pthread_cleanup_stack;
+
 struct __pthread_cancelation_handler **
 ___pthread_get_cleanup_stack (void)
 {
diff --git a/htl/pt-internal.h b/htl/pt-internal.h
index 1bab90cf93..2bc9d82d59 100644
--- a/htl/pt-internal.h
+++ b/htl/pt-internal.h
@@ -192,9 +192,6 @@ libc_hidden_proto (__pthread_max_threads)
 #ifndef _pthread_self
 extern struct __pthread *_pthread_self (void);
 #endif
-
-/* Stores the stack of cleanup handlers for the thread.  */
-extern __thread struct __pthread_cancelation_handler *__pthread_cleanup_stack;
 
 
 /* Initialize the pthreads library.  */
-- 
2.51.0


Reply via email to