From f881f17267506f3ced17259a066a4d95bffb57f0 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 24 Sep 2017 23:09:59 +0200 Subject: Fix symbols exposed in linkspace Libc uses some thread functions, but should not expose the corresponding symbols, so use aliases. * Versions (__cthread_detach, __cthread_fork, __cthread_keycreate, __cthread_getspecific, __cthread_setspecific, __pthread_getattr_np, __pthread_attr_getstack): Add symbols * pthread/cthreads-compat.c (cthread_t, cthread_fn_t, cthread_key_t): Do not define. (cthread_detach): Rename to __cthread_detach. (cthread_detach): Define as weak alias to __cthread_detach. (cthread_fork, cthread_keycreate, cthread_getspecific, cthread_setspecific): Likewise. * pthread/pt-getattr.c (pthread_getattr_np): Likewise. * sysdeps/generic/pt-attr-getstack.c (pthread_attr_getstack): Likewise. * sysdeps/pthread/pthread.h (__cthread_t, __cthread_key_t, __cthread_fn_t, __cthread_fork, __cthread_detach, __cthread_keycreate, __cthread_getspecific, __cthread_setspecific, __pthread_getattr_np, __pthread_attr_getstack): Declare. --- pthread/pt-getattr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pthread/pt-getattr.c') diff --git a/pthread/pt-getattr.c b/pthread/pt-getattr.c index 574420a..0b86c66 100644 --- a/pthread/pt-getattr.c +++ b/pthread/pt-getattr.c @@ -27,7 +27,7 @@ already running thread THREAD. It shall be called on an uninitialized ATTR and destroyed with pthread_attr_destroy when no longer needed. */ int -pthread_getattr_np (pthread_t thread, pthread_attr_t *attr) +__pthread_getattr_np (pthread_t thread, pthread_attr_t *attr) { struct __pthread *pthread; @@ -49,3 +49,4 @@ pthread_getattr_np (pthread_t thread, pthread_attr_t *attr) return 0; } +weak_alias (__pthread_getattr_np, pthread_getattr_np) -- cgit v1.2.3