Skip to content

Commit efcca9d

Browse files
authored
fix pthread_setname_np(3) wrong call (#1182)
Reference: https://man.netbsd.org/pthread_setname_np.3
1 parent 5cc9aa7 commit efcca9d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/thread/thread.c

+2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ static int handler(void *p)
9494
#elif defined(HAVE_PTHREAD)
9595
#if defined(OPENBSD)
9696
(void)pthread_set_name_np(*th.thr, th.name);
97+
#elif defined(__NetBSD__)
98+
(void)pthread_setname_np(*th.thr, "%s", th.name);
9799
#else
98100
(void)pthread_setname_np(*th.thr, th.name);
99101
#endif

0 commit comments

Comments
 (0)