Skip to content

Commit

Permalink
[core] Fixed pthread_setname_np(3) call on NetBSD (#3018).
Browse files Browse the repository at this point in the history

Signed-off-by: leleliu008 <[email protected]>
  • Loading branch information
leleliu008 authored Sep 6, 2024
1 parent 9c7206f commit 3e0ef4b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions srtcore/threadname.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ class ThreadName
#elif defined(HAVE_PTHREAD_SETNAME_NP)
#if defined(__APPLE__)
return pthread_setname_np(name) == 0;
#elif defined(__NetBSD__)
return pthread_setname_np(pthread_self(), "%s", name) == 0;
#else
return pthread_setname_np(pthread_self(), name) == 0;
#endif
Expand Down

0 comments on commit 3e0ef4b

Please sign in to comment.