summaryrefslogtreecommitdiff
path: root/lib/util/smb_threads.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-04-20 04:00:06 -0700
committerJeremy Allison <jra@samba.org>2009-04-20 04:00:06 -0700
commit399c765538d91c696efd1496fffd9ae1e876f3ae (patch)
treea8fc0b6f3a9f34b3d2e7d33fce9906a160a9324b /lib/util/smb_threads.h
parent3d2e95c296a1858986b9c806dff67c9cc3d8f70d (diff)
downloadsamba-399c765538d91c696efd1496fffd9ae1e876f3ae.tar.gz
samba-399c765538d91c696efd1496fffd9ae1e876f3ae.tar.bz2
samba-399c765538d91c696efd1496fffd9ae1e876f3ae.zip
Attempt to fix build farm on platforms where pthread_once_t is a struct.
Jeremy.
Diffstat (limited to 'lib/util/smb_threads.h')
-rw-r--r--lib/util/smb_threads.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/util/smb_threads.h b/lib/util/smb_threads.h
index f4ed1fcb9a..682e142c5b 100644
--- a/lib/util/smb_threads.h
+++ b/lib/util/smb_threads.h
@@ -33,8 +33,11 @@
#if defined(HAVE_PTHREAD_H)
#define SMB_THREAD_ONCE_INIT PTHREAD_ONCE_INIT
+#define SMB_THREAD_ONCE_IS_INITIALIZED(val) (true)
+#define SMB_THREAD_ONCE_INITIALIZE(val)
#else
-#define SMB_THREAD_ONCE_INIT false
+#define SMB_THREAD_ONCE_IS_INITIALIZED(val) ((val) == true)
+#define SMB_THREAD_ONCE_INITIALIZE(val) ((val) = true)
#endif
enum smb_thread_lock_type {