Commit ead789eb authored by Volker Rümelin's avatar Volker Rümelin Committed by Gerd Hoffmann
Browse files

jackaudio: use ifdefs to hide unavailable functions

On Windows the jack_set_thread_creator() function and on MacOS the
pthread_setname_np() function with a thread pointer paramater is
not available. Use #ifdefs to remove the jack_set_thread_creator()
function call and the qjack_thread_creator() function in both

The qjack_thread_creator() function just sets the name of the
created thread for debugging purposes and isn't really necessary.

From the jack_set_thread_creator() documentation:

No normal application/client should consider calling this. (...)

Resolves: #785

Signed-off-by: Volker Rümelin's avatarVolker Rümelin <>
Reviewed-by: Christian Schoenebeck's avatarChristian Schoenebeck <>
Message-Id: <>
Signed-off-by: Gerd Hoffmann's avatarGerd Hoffmann <>
parent 1dbbe6f1
......@@ -622,6 +622,7 @@ static void qjack_enable_in(HWVoiceIn *hw, bool enable)
ji->c.enabled = enable;
#if !defined(WIN32) && defined(CONFIG_PTHREAD_SETNAME_NP_W_TID)
static int qjack_thread_creator(jack_native_thread_t *thread,
const pthread_attr_t *attr, void *(*function)(void *), void *arg)
......@@ -635,6 +636,7 @@ static int qjack_thread_creator(jack_native_thread_t *thread,
return ret;
static void *qjack_init(Audiodev *dev)
......@@ -687,7 +689,9 @@ static void register_audio_jack(void)
#if !defined(WIN32) && defined(CONFIG_PTHREAD_SETNAME_NP_W_TID)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment