Skip to content

Commit

Permalink
qemu: correct pthread_setname_np invocation on macOS
Browse files Browse the repository at this point in the history
From kflu in PR #107.

Note that I did not test a macOS build due to a lack of access to a Mac.
  • Loading branch information
bsiegert committed Jun 11, 2022
1 parent 5c534d0 commit f303fb2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions emulators/qemu/distinfo
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
$NetBSD: distinfo,v 1.191 2022/05/19 16:10:15 ryoon Exp $
$NetBSD: distinfo,v 1.192 2022/06/11 10:13:05 bsiegert Exp $

BLAKE2s (palcode-clipper-qemu-5.2.0nb8) = d388c896a80c1cc3d4785c8434d6688bbcfd54c28f7252ce550ab162a0bba321
SHA512 (palcode-clipper-qemu-5.2.0nb8) = 33695d6001d86a19793a92d5e31775607c4dfc9ab9eea019ea6c4d543a2e11e8c07f83cca4934811a13ef829b528737ea37d9d2aaf66cba6f2746d44d2aa0b43
Size (palcode-clipper-qemu-5.2.0nb8) = 159808 bytes
BLAKE2s (qemu-7.0.0.tar.xz) = 1d0df58230a436f476df87a7b315ab381743a24837314978f687986d4d0f2a16
SHA512 (qemu-7.0.0.tar.xz) = 44ecd10c018a3763e1bc87d1d35b98890d0d5636acd69fe9b5cadf5024d5af6a31684d60cbe1c3370e02986434c1fb0ad99224e0e6f6fe7eda169992508157b1
Size (qemu-7.0.0.tar.xz) = 125117636 bytes
SHA1 (patch-audio_jackaudio.c) = 0c9e2bea94857007938e16285b721d1495fcb8e1
SHA1 (patch-audio_jackaudio.c) = 771c2779e565242a500adc0223ef6b1ae5b2b91f
SHA1 (patch-backends_tpm_tpm__ioctl.h) = fbd6c877ad605f7120290efbb0ac653c69f351de
SHA1 (patch-hw-mips-Kconfig) = c7199ad26ac45116ab4d38252db4234ae93bdf9a
SHA1 (patch-hw-mips-mipssim.c) = 1f682b74b34398b3ff15f9e7f24a85f4b8bb4853
Expand Down
8 changes: 5 additions & 3 deletions emulators/qemu/patches/patch-audio_jackaudio.c
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
$NetBSD: patch-audio_jackaudio.c,v 1.1 2021/12/27 10:12:57 nia Exp $
$NetBSD: patch-audio_jackaudio.c,v 1.2 2022/06/11 10:13:06 bsiegert Exp $

Teach it about NetBSD's pthread_setname_np.
Teach it about NetBSD's and macOS' pthread_setname_np.

--- audio/jackaudio.c.orig 2021-12-14 20:42:02.000000000 +0000
+++ audio/jackaudio.c
@@ -631,7 +631,11 @@ static int qjack_thread_creator(jack_nat
@@ -631,7 +631,13 @@ static int qjack_thread_creator(jack_nat
}

/* set the name of the thread */
+#ifdef __NetBSD__
+ pthread_setname_np(*thread, "%s", (void *)"jack-client");
+#elif __APPLE__
+ pthread_setname_np("jack-client");
+#else
pthread_setname_np(*thread, "jack-client");
+#endif
Expand Down

0 comments on commit f303fb2

Please sign in to comment.