summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/my_pthread.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 9ada1d90712..f1b9320a075 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -223,7 +223,11 @@ extern int my_pthread_getprio(pthread_t thread_id);
typedef void *(* pthread_handler)(void *);
#define my_pthread_once_t pthread_once_t
+#if defined(PTHREAD_ONCE_INITIALIZER)
+#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INITIALIZER
+#else
#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#endif
#define my_pthread_once(C,F) pthread_once(C,F)
/* Test first for RTS or FSU threads */