From b1f8732126f23cbd2345faa6ae326cd7b75bab5d Mon Sep 17 00:00:00 2001 From: cbdev Date: Wed, 6 Nov 2019 21:30:46 +0100 Subject: Fix mutex type for OSX --- backends/jack.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'backends') 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; } -- cgit v1.2.3