summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_self.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/thread/thr_self.c')
-rw-r--r--lib/libpthread/thread/thr_self.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_self.c b/lib/libpthread/thread/thr_self.c
index d213e5e..0c702a6 100644
--- a/lib/libpthread/thread/thr_self.c
+++ b/lib/libpthread/thread/thr_self.c
@@ -39,6 +39,9 @@ __weak_reference(_pthread_self, pthread_self);
pthread_t
_pthread_self(void)
{
+ if (_thr_initial == NULL)
+ _libpthread_init(NULL);
+
/* Return the running thread pointer: */
return (_get_curthread());
}
OpenPOWER on IntegriCloud