aboutsummaryrefslogtreecommitdiffstats
path: root/main/asterisk/musl-pjsip-mutex.patch
blob: b73d93f7eb23c7a3881bf3e8db3390dbec58f5ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- asterisk-11.7.0.orig/res/pjproject/pjlib/src/pj/os_core_unix.c
+++ asterisk-11.7.0/res/pjproject/pjlib/src/pj/os_core_unix.c
@@ -1091,8 +1091,7 @@
 	return PJ_RETURN_OS_ERROR(rc);
 
     if (type == PJ_MUTEX_SIMPLE) {
-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
-    defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
+#if defined(PJ_LINUX) && PJ_LINUX!=0 && defined(__GLIBC__)
 	rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_FAST_NP);
 #elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \
        defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE)
@@ -1101,8 +1100,7 @@
 	rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
 #endif
     } else {
-#if (defined(PJ_LINUX) && PJ_LINUX!=0) || \
-     defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE)
+#if (defined(PJ_LINUX) && PJ_LINUX!=0) && defined(__GLIBC__)
 	rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
 #elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \
        defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE)