mirror of
https://github.com/decompals/wibo.git
synced 2025-12-14 23:56:16 +00:00
Fix HAVE_PTHREAD_GETTID_NP definition
This commit is contained in:
@@ -276,7 +276,9 @@ include(CheckSymbolExists)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
|
||||
set(CMAKE_REQUIRED_LIBRARIES pthread)
|
||||
check_symbol_exists(pthread_gettid_np "pthread.h" HAVE_PTHREAD_GETTID_NP)
|
||||
target_compile_definitions(wibo PRIVATE -DHAVE_PTHREAD_GETTID_NP=${HAVE_PTHREAD_GETTID_NP})
|
||||
if (HAVE_PTHREAD_GETTID_NP)
|
||||
target_compile_definitions(wibo PRIVATE -DHAVE_PTHREAD_GETTID_NP=1)
|
||||
endif()
|
||||
|
||||
find_package(Python3 COMPONENTS Interpreter REQUIRED)
|
||||
|
||||
|
||||
@@ -353,7 +353,7 @@ std::vector<std::string> splitCommandLine(const char *commandLine) {
|
||||
}
|
||||
|
||||
DWORD getThreadId() {
|
||||
#if HAVE_PTHREAD_GETTID_NP
|
||||
#if defined(HAVE_PTHREAD_GETTID_NP)
|
||||
pid_t threadId = pthread_gettid_np(pthread_self());
|
||||
#elif defined(__linux__)
|
||||
pid_t threadId = gettid();
|
||||
|
||||
Reference in New Issue
Block a user