blob: b44cd70466ae9125b7cd03195ae5ccbac9f237fc [file] [log] [blame]
--- a/pjlib/src/pj/os_core_unix.c
+++ b/pjlib/src/pj/os_core_unix.c
@@ -1139,7 +1139,7 @@ static pj_status_t init_mutex(pj_mutex_t
return PJ_RETURN_OS_ERROR(rc);
if (type == PJ_MUTEX_SIMPLE) {
-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
+#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || \
defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \
@@ -1149,7 +1149,7 @@ static pj_status_t init_mutex(pj_mutex_t
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
#endif
} else {
-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
+#if (defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)) || \
defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
#elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \