aboutsummaryrefslogtreecommitdiff
path: root/gcc/gthr-posix.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gthr-posix.h')
-rw-r--r--gcc/gthr-posix.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/gthr-posix.h b/gcc/gthr-posix.h
index 7cab614..a46c653 100644
--- a/gcc/gthr-posix.h
+++ b/gcc/gthr-posix.h
@@ -54,8 +54,10 @@ typedef pthread_mutex_t __gthread_recursive_mutex_t;
#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER
#elif defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP)
#define __GTHREAD_RECURSIVE_MUTEX_INIT PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
-#else
+#elif defined(PTHREAD_MUTEX_RECURSIVE)
#define __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION __gthread_recursive_mutex_init_function
+#else
+#define __GTHREAD_RECURSIVE_MUTEX_INIT RECURSIVE_ERRORCHECKMUTEX
#endif
#if SUPPORTS_WEAK && GTHREAD_USE_WEAK
@@ -529,7 +531,7 @@ __gthread_mutex_unlock (__gthread_mutex_t *mutex)
return 0;
}
-#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
+#if !defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP) && defined(PTHREAD_MUTEX_RECURSIVE)
static inline int
__gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex)
{