Skip to content

Commit e72b5b4

Browse files
committed
Use getthrid() on OpenBSD for fallback thread global thread
id
1 parent b6b3cc5 commit e72b5b4

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
@@ -1104,6 +1104,8 @@ namespace loguru
11041104
#elif defined(__FreeBSD__)
11051105
long thread_id;
11061106
(void)thr_self(&thread_id);
1107+
#elif defined(__OpenBSD__)
1108+
pid_t thread_id = getthrid();
11071109
#elif LOGURU_PTHREADS
11081110
uint64_t thread_id = reinterpret_cast<uint64_t>(pthread_self());
11091111
#else

0 commit comments

Comments
 (0)