summaryrefslogtreecommitdiff
path: root/evthread_pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'evthread_pthread.c')
-rw-r--r--evthread_pthread.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/evthread_pthread.c b/evthread_pthread.c
index a40f5b02..94e7da95 100644
--- a/evthread_pthread.c
+++ b/evthread_pthread.c
@@ -190,11 +190,15 @@ evthread_use_pthreads_with_flags(int flags)
return -1;
if (flags & EVTHREAD_PTHREAD_PRIO_INHERIT) {
+#ifdef EVENT__HAVE_PTHREAD_MUTEXATTR_SETPROTOCOL
/* Set up priority inheritance */
if (pthread_mutexattr_setprotocol(&attr_default, PTHREAD_PRIO_INHERIT))
return -1;
if (pthread_mutexattr_setprotocol(&attr_recursive, PTHREAD_PRIO_INHERIT))
return -1;
+#else
+ return -1;
+#endif
}
evthread_set_lock_callbacks(&cbs);