MacOs build fix proposal.

Made on Big Sur, removing few unnecessary old specifics.
Build with LLVM homebrew.
This commit is contained in:
David Carlier 2021-04-18 11:26:49 +01:00 committed by Ivan
parent 68fa377d13
commit b6732fbae9
4 changed files with 7 additions and 55 deletions

View file

@ -2984,9 +2984,12 @@ std::pair<void*, usz> thread_ctrl::get_thread_stack()
void* saddr = 0;
usz ssize = 0;
pthread_attr_t attr;
#ifdef __linux__
#if defined(__linux__)
pthread_getattr_np(pthread_self(), &attr);
pthread_attr_getstack(&attr, &saddr, &ssize);
#elif defined(__APPLE__)
saddr = pthread_get_stackaddr_np(pthread_self());
ssize = pthread_get_stacksize_np(pthread_self());
#else
pthread_attr_get_np(pthread_self(), &attr);
pthread_attr_getstackaddr(&attr, &saddr);