aboutsummaryrefslogtreecommitdiffstats
path: root/main/asterisk/musl-mutex-init.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-08-04 16:03:15 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-08-04 16:03:15 +0300
commit4291c7de2d59b026cf346e174bf14945cfc617b6 (patch)
tree0edd8b8b02ddf5ee158263f6685de12e14ac2ad3 /main/asterisk/musl-mutex-init.patch
parent1a3fcd1cc8baf52c13053465260f220652cf4277 (diff)
downloadaports-4291c7de2d59b026cf346e174bf14945cfc617b6.tar.bz2
aports-4291c7de2d59b026cf346e174bf14945cfc617b6.tar.xz
main/asterisk: do not use mutex initializers
... the default type should not be assumed to be recursive as it's not specified in any spec. And in musl it defaults to non-recursive mutex.
Diffstat (limited to 'main/asterisk/musl-mutex-init.patch')
-rw-r--r--main/asterisk/musl-mutex-init.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/asterisk/musl-mutex-init.patch b/main/asterisk/musl-mutex-init.patch
new file mode 100644
index 0000000000..891d3fd10a
--- /dev/null
+++ b/main/asterisk/musl-mutex-init.patch
@@ -0,0 +1,12 @@
+diff -ru asterisk-12.4.0.orig/include/asterisk/lock.h asterisk-12.4.0/include/asterisk/lock.h
+--- asterisk-12.4.0.orig/include/asterisk/lock.h 2013-11-02 06:05:24.000000000 -0200
++++ asterisk-12.4.0/include/asterisk/lock.h 2014-08-04 16:00:29.811967599 -0300
+@@ -66,7 +66,7 @@
+ #define AST_PTHREADT_NULL (pthread_t) -1
+ #define AST_PTHREADT_STOP (pthread_t) -2
+
+-#if (defined(SOLARIS) || defined(BSD))
++#if (defined(SOLARIS) || defined(BSD) || !defined(HAVE_PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP))
+ #define AST_MUTEX_INIT_W_CONSTRUCTORS
+ #endif /* SOLARIS || BSD */
+