--- parser3/src/main/pa_threads.C 2026/04/25 13:38:46 1.11 +++ parser3/src/main/pa_threads.C 2026/10/29 10:30:36 1.12 @@ -7,7 +7,7 @@ #include "pa_threads.h" -volatile const char * IDENT_PA_THREADS_C="$Id: pa_threads.C,v 1.11 2026/04/25 13:38:46 moko Exp $" IDENT_PA_THREADS_H; +volatile const char * IDENT_PA_THREADS_C="$Id: pa_threads.C,v 1.12 2026/10/29 10:30:36 moko Exp $" IDENT_PA_THREADS_H; Mutex global_mutex; @@ -39,10 +39,15 @@ void Mutex::release() { #ifdef HAVE_GETTID #include #endif +#ifdef HAVE_PTHREAD_GETTHREADID_NP +#include +#endif uint pa_get_thread_id() { -#ifdef HAVE_GETTID +#if defined(HAVE_GETTID) return syscall(__NR_gettid); +#elif defined(HAVE_PTHREAD_GETTHREADID_NP) + return pthread_getthreadid_np(); #else return getpid(); #endif