fix darwin build break
authorCraig Dowell <craigdo@ee.washington.edu>
Thu, 17 Jul 2008 18:45:58 -0700
changeset 3433 d1e0154c45b3
parent 3432 2dd172a2bc64
child 3434 ee113f8d83db
fix darwin build break
src/core/unix-system-mutex.cc
--- a/src/core/unix-system-mutex.cc	Thu Jul 17 17:58:14 2008 +0100
+++ b/src/core/unix-system-mutex.cc	Thu Jul 17 18:45:58 2008 -0700
@@ -51,7 +51,14 @@
 // deadlocking it returns an error.  It will also check to make sure a thread
 // has previously called pthread_mutex_lock when it calls pthread_mutex_unlock.
 //
+// Linux and OS X (at least) have, of course chosen different names for the 
+// error checking flags just to make life difficult.
+//
+#if defined (PTHREAD_MUTEX_ERRORCHECK_NP)
   pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_ERRORCHECK_NP);
+#else
+  pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_ERRORCHECK);
+#endif
   pthread_mutex_init (&m_mutex, &attr);
 }