af5d8b235021c82a39bdfc3bc8143db486556227
[feed/telephony.git] / net / yate / patches / 100-non-gnu-mutex-type.patch
1 Index: yate/engine/Mutex.cpp
2 ===================================================================
3 --- yate.orig/engine/Mutex.cpp
4 +++ yate/engine/Mutex.cpp
5 @@ -30,6 +30,10 @@ typedef HANDLE HSEMAPHORE;
6 #include <semaphore.h>
7 #include <time.h>
8
9 +#ifndef PTHREAD_MUTEX_RECURSIVE_NP
10 +#define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE
11 +#endif
12 +
13 #ifdef MUTEX_HACK
14 extern "C" {
15 #if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
16 Index: yate/configure.ac
17 ===================================================================
18 --- yate.orig/configure.ac
19 +++ yate/configure.ac
20 @@ -257,7 +257,7 @@ AC_TRY_COMPILE([
21 #include <pthread.h>
22 ],[
23 pthread_mutexattr_t attr;
24 -pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE_NP);
25 +pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
26 ],
27 have_mutex_settype="yes",
28 have_mutex_settype="no"