Skip to content

Commit 3e0ef4b

Browse files
authored
[core] Fixed pthread_setname_np(3) call on NetBSD (#3018).
Signed-off-by: leleliu008 <[email protected]>
1 parent 9c7206f commit 3e0ef4b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

srtcore/threadname.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ class ThreadName
103103
#elif defined(HAVE_PTHREAD_SETNAME_NP)
104104
#if defined(__APPLE__)
105105
return pthread_setname_np(name) == 0;
106+
#elif defined(__NetBSD__)
107+
return pthread_setname_np(pthread_self(), "%s", name) == 0;
106108
#else
107109
return pthread_setname_np(pthread_self(), name) == 0;
108110
#endif

0 commit comments

Comments
 (0)