Skip to content

Commit fa9bb57

Browse files
committed
On FreeBSD and OpenBSD use pthread_get_name_np spelling instead of pthread_getname_np
Annoyingly, these functions are spelt differently on different OSes.
1 parent 20b0e83 commit fa9bb57

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

loguru.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,8 @@ namespace loguru
10801080
} else {
10811081
buffer[0] = 0;
10821082
}
1083+
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
1084+
pthread_get_name_np(pthread_self(), buffer, length);
10831085
#elif LOGURU_PTHREADS
10841086
// Ask the OS about the thread name.
10851087
// This is what we *want* to do on all platforms, but

0 commit comments

Comments
 (0)