Skip to content

Commit

Permalink
pthread_setname_np(3) has different signature on NetBSD
Browse files Browse the repository at this point in the history
  • Loading branch information
leleliu008 committed Sep 3, 2024
1 parent 9c7206f commit c6a87cc
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 c6a87cc

Please sign in to comment.