diff -rupN --no-dereference Python-3.10.9/Python/thread_pthread.h Python-3.10.9-new/Python/thread_pthread.h --- Python-3.10.9/Python/thread_pthread.h 2022-12-06 19:31:21.000000000 +0100 +++ Python-3.10.9-new/Python/thread_pthread.h 2022-12-08 09:36:57.946024830 +0100 @@ -359,6 +359,9 @@ PyThread_get_thread_native_id(void) #elif defined(__NetBSD__) lwpid_t native_id; native_id = _lwp_self(); +#elif defined(__MINGW32__) + pthread_t native_id; + native_id = pthread_self(); #endif return (unsigned long) native_id; }