aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/htl/thrd_current.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/htl/thrd_current.c')
-rw-r--r--sysdeps/htl/thrd_current.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/htl/thrd_current.c b/sysdeps/htl/thrd_current.c
index eecb86a..8735967 100644
--- a/sysdeps/htl/thrd_current.c
+++ b/sysdeps/htl/thrd_current.c
@@ -17,14 +17,19 @@
<https://www.gnu.org/licenses/>. */
#include "thrd_priv.h"
+#include <ldsodefs.h>
#pragma weak __pthread_self
#pragma weak __pthread_threads
+#ifndef SHARED
+#pragma weak _dl_pthread_threads
+#endif
+
thrd_t
thrd_current (void)
{
- if (__pthread_threads)
+ if (GL (dl_pthread_threads))
return (thrd_t) __pthread_self ();
return (thrd_t) 0;