Skip to content

Commit

Permalink
fix pthread_setname_np(3) wrong call
Browse files Browse the repository at this point in the history
Reference: https://man.netbsd.org/pthread_setname_np.3

Signed-off-by: leleliu008 <leleliu008@gmail.com>
  • Loading branch information
leleliu008 committed Aug 29, 2024
1 parent 5cc9aa7 commit b47bab6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/thread/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ static int handler(void *p)
#elif defined(HAVE_PTHREAD)
#if defined(OPENBSD)
(void)pthread_set_name_np(*th.thr, th.name);
#elif defined(__NetBSD__)
(void)pthread_setname_np(*th.thr, "%s" th.name);
#else
(void)pthread_setname_np(*th.thr, th.name);
#endif
Expand Down

0 comments on commit b47bab6

Please sign in to comment.