--- a/src/core/unix-system-condition.cc Fri Jul 18 11:12:31 2008 +0100
+++ b/src/core/unix-system-condition.cc Fri Jul 18 11:23:29 2008 +0100
@@ -55,7 +55,15 @@
pthread_mutexattr_t mAttr;
pthread_mutexattr_init (&mAttr);
+//
+// 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 (&mAttr, PTHREAD_MUTEX_ERRORCHECK_NP);
+#else
+ pthread_mutexattr_settype (&mAttr, PTHREAD_MUTEX_ERRORCHECK);
+#endif
pthread_mutex_init (&m_mutex, &mAttr);
pthread_condattr_t cAttr;
--- a/src/core/unix-system-mutex.cc Fri Jul 18 11:12:31 2008 +0100
+++ b/src/core/unix-system-mutex.cc Fri Jul 18 11:23:29 2008 +0100
@@ -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);
}