mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 10:32:56 +01:00
Defined SYS_gettid to __NR_gettid when not already defined.
This commit is contained in:
@@ -365,6 +365,9 @@ ThreadImpl* ThreadImpl::currentImpl()
|
|||||||
ThreadImpl::TIDImpl ThreadImpl::currentTidImpl()
|
ThreadImpl::TIDImpl ThreadImpl::currentTidImpl()
|
||||||
{
|
{
|
||||||
#if POCO_OS == POCO_OS_LINUX
|
#if POCO_OS == POCO_OS_LINUX
|
||||||
|
#ifndef SYS_gettid
|
||||||
|
#define SYS_gettid __NR_gettid
|
||||||
|
#endif
|
||||||
return static_cast<TIDImpl>( syscall (SYS_gettid) );
|
return static_cast<TIDImpl>( syscall (SYS_gettid) );
|
||||||
#elif POCO_OS == POCO_OS_MAC_OS_X
|
#elif POCO_OS == POCO_OS_MAC_OS_X
|
||||||
return static_cast<TIDImpl>( pthread_mach_thread_np(pthread_self()) );
|
return static_cast<TIDImpl>( pthread_mach_thread_np(pthread_self()) );
|
||||||
|
|||||||
Reference in New Issue
Block a user