Skip to contentSkip to conversation

audio: Fix macOS JACK Audio Connection Kit

PATCH In review Philippe Mathieu-Daudé 2 participants 3 messages Mar 7 – Mar 8

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 audio: Fix macOS JACK Audio Connection Kit

Since commit 8f68a33ad46 we get on macOS:

Audio backends

    CoreAudio support               : YES
    PipeWire support                : NO
    JACK support                    : YES 1.9.22

../audio/jackaudio.c:654:12: error: unused function 'qjack_thread_creator' [-Werror,-Wunused-function]
654 | static int qjack_thread_creator(jack_native_thread_t *thread,
| ^~~~~~~~~~~~~~~~~~~~

This is simply due to a missing #ifdef'ry change. Update so we can use the new qemu_thread_set_name() exposed by commit 46255cc2be9.

Fixes 8f68a33ad46 ("audio: make jackaudio use qemu_thread_set_name")
---
 audio/jackaudio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
audio/jackaudio.c +1 -1
index be6fb378f72..589aecede9a 100644
@@ -712,7 +712,7 @@ static const TypeInfo audio_types[] = {
 static void __attribute__((__constructor__)) audio_jack_init(void)
 {
     qemu_mutex_init(&qjack_shutdown_lock);
-#if !defined(WIN32) && defined(CONFIG_PTHREAD_SETNAME_NP_W_TID)
+#if !defined(WIN32)
     jack_set_thread_creator(qjack_thread_creator);
 #endif
     jack_set_error_function(qjack_error);
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 12 lines · On Saturday, 7 March 2026 12:49:23 CET Philippe Mathieu-Daudé wrote:

Since commit 8f68a33ad46 we get on macOS:

Audio backends

    CoreAudio support               : YES
    PipeWire support                : NO
    JACK support                    : YES 1.9.22

../audio/jackaudio.c:654:12: error: unused function 'qjack_thread_creator'
[-Werror,-Wunused-function] 654 | static int qjack_thread_creator(jack_native_thread_t *thread,

        |            ^~~~~~~~~~~~~~~~~~~~
Quoted 7 lines

This is simply due to a missing #ifdef'ry change. Update so we can use the new qemu_thread_set_name() exposed by commit 46255cc2be9.

Fixes 8f68a33ad46 ("audio: make jackaudio use qemu_thread_set_name")

---

Nit: the commit title could have been a bit more precise, e.g. fix use of qjack_thread_creator() on macOS.

Quoted 16 lines
 audio/jackaudio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
audio/jackaudio.c +1 -1
index be6fb378f72..589aecede9a 100644
@@ -712,7 +712,7 @@ static const TypeInfo audio_types[] = {
 static void __attribute__((__constructor__)) audio_jack_init(void)
 {
     qemu_mutex_init(&qjack_shutdown_lock);
-#if !defined(WIN32) && defined(CONFIG_PTHREAD_SETNAME_NP_W_TID)
+#if !defined(WIN32)
     jack_set_thread_creator(qjack_thread_creator);
 #endif
     jack_set_error_function(qjack_error);
#2 lore raw
Quoted 17 lines · Christian Schoenebeck
Quoted 16 lines · On Saturday, 7 March 2026 12:49:23 CET Philippe Mathieu-Daudé wrote:

Since commit 8f68a33ad46 we get on macOS:

Audio backends

     CoreAudio support               : YES
     PipeWire support                : NO
     JACK support                    : YES 1.9.22

../audio/jackaudio.c:654:12: error: unused function 'qjack_thread_creator'
[-Werror,-Wunused-function] 654 | static int qjack_thread_creator(jack_native_thread_t *thread,

         |            ^~~~~~~~~~~~~~~~~~~~

This is simply due to a missing #ifdef'ry change. Update so we can use the new qemu_thread_set_name() exposed by commit 46255cc2be9.

Quoted 8 lines
Quoted 3 lines
Fixes 8f68a33ad46 ("audio: make jackaudio use qemu_thread_set_name")

---

Nit: the commit title could have been a bit more precise, e.g. fix use of qjack_thread_creator() on macOS.

Queued via hw-misc updating subject, thanks.