Skip to content

Commit 64b55f6

Browse files
authored
Logging using native NetBSD thread id call. (#708)
1 parent 6edfd53 commit 64b55f6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/libmongoc/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ if (NOT ENABLE_SSL STREQUAL OFF)
643643
if (WIN32)
644644
set (SSL_LIBRARIES ${SSL_LIBRARIES} crypt32.lib)
645645
else ()
646-
set (SSL_STATIC_LIBRARIES -ldl)
646+
set (SSL_STATIC_LIBRARIES ${CMAKE_DL_LIBS})
647647
endif ()
648648
elseif (SECURE_TRANSPORT)
649649
message (STATUS "Compiling against Secure Transport")

src/libmongoc/src/mongoc/mongoc-log.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include <process.h>
2222
#elif defined(__FreeBSD__)
2323
#include <sys/thr.h>
24+
#elif defined(__NetBSD__)
25+
#include <lwp.h>
2426
#else
2527
#include <unistd.h>
2628
#endif
@@ -179,6 +181,8 @@ mongoc_log_default_handler (mongoc_log_level_t log_level,
179181
pid = (int) tid;
180182
#elif defined(__OpenBSD__)
181183
pid = (int) getthrid ();
184+
#elif defined(__NetBSD__)
185+
pid = (int) _lwp_self ();
182186
#else
183187
pid = (int) getpid ();
184188
#endif

0 commit comments

Comments
 (0)