From 20eb48ce4ccffe88b22ecd6a93bc9e097e5aa498 Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 6 Nov 2019 21:22:09 +0100 Subject: Use default mutex type for OSX --- README.md | 2 +- backends/jack.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f23e696..def72d6 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Currently, the MIDIMonster supports the following protocols: | evdev input devices | Linux | Virtual output supported | [`evdev`](backends/evdev.md) | | Open Lighting Architecture | Linux, OSX | | [`ola`](backends/ola.md) | | MA Lighting Web Remote | Linux, Windows, OSX | GrandMA and dot2 (incl. OnPC) | [`maweb`](backends/maweb.md) | -| JACK/LV2 Control Voltage (CV) | Linux | | [`jack`](backends/jack.md) | +| JACK/LV2 Control Voltage (CV) | Linux, OSX | | [`jack`](backends/jack.md) | with additional flexibility provided by a [Lua scripting environment](backends/lua.md). diff --git a/backends/jack.c b/backends/jack.c index f73ada8..efcd8d5 100644 --- a/backends/jack.c +++ b/backends/jack.c @@ -607,7 +607,11 @@ 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; } -- cgit v1.2.3