aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-11-06 21:30:46 +0100
committercbdev <cb@cbcdn.com>2019-11-06 21:30:46 +0100
commitb1f8732126f23cbd2345faa6ae326cd7b75bab5d (patch)
tree8b6dc756ee2aedfa0ec20a72ba68997d9cf42fc7 /backends
parent5a79158ec0195cacbc8f4661dff5b26363797447 (diff)
downloadmidimonster-b1f8732126f23cbd2345faa6ae326cd7b75bab5d.tar.gz
midimonster-b1f8732126f23cbd2345faa6ae326cd7b75bab5d.tar.bz2
midimonster-b1f8732126f23cbd2345faa6ae326cd7b75bab5d.zip
Fix mutex type for OSX
Diffstat (limited to 'backends')
-rw-r--r--backends/jack.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/backends/jack.c b/backends/jack.c
index 48a6b68..b3aacd4 100644
--- a/backends/jack.c
+++ b/backends/jack.c
@@ -11,6 +11,12 @@
#define BACKEND_NAME "jack"
#define JACKEY_SIGNAL_TYPE "http://jackaudio.org/metadata/signal-type"
+#ifdef __APPLE__
+ #ifndef PTHREAD_MUTEX_ADAPTIVE_NP
+ #define PTHREAD_MUTEX_ADAPTIVE_NP PTHREAD_MUTEX_DEFAULT
+ #endif
+#endif
+
//FIXME pitchbend range is somewhat oob
static struct /*_mmjack_backend_cfg*/ {
@@ -607,11 +613,7 @@ static int mmjack_start(){
//prepare mutex attributes because the initializer macro for adaptive mutexes is a GNU extension...
if(pthread_mutexattr_init(&mutex_attr)
-#ifndef __APPLE__
|| pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_ADAPTIVE_NP)){
-#else
- }
-#endif
fprintf(stderr, "Failed to initialize mutex attributes\n");
goto bail;
}