summaryrefslogtreecommitdiffstats
path: root/lib/libkse/thread/thr_once.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libkse/thread/thr_once.c')
-rw-r--r--lib/libkse/thread/thr_once.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libkse/thread/thr_once.c b/lib/libkse/thread/thr_once.c
index d7bb494..dde5474 100644
--- a/lib/libkse/thread/thr_once.c
+++ b/lib/libkse/thread/thr_once.c
@@ -31,12 +31,13 @@
*
* $FreeBSD$
*/
-#ifdef _THREAD_SAFE
#include <pthread.h>
#include "pthread_private.h"
+#pragma weak pthread_once=_pthread_once
+
int
-pthread_once(pthread_once_t * once_control, void (*init_routine) (void))
+_pthread_once(pthread_once_t * once_control, void (*init_routine) (void))
{
if (once_control->state == PTHREAD_NEEDS_INIT) {
if (_thread_initial == NULL)
@@ -50,4 +51,3 @@ pthread_once(pthread_once_t * once_control, void (*init_routine) (void))
}
return (0);
}
-#endif
OpenPOWER on IntegriCloud