Only try using __pthread_get_minstack on glibc
This is a glibc-only extension, so don't bother on other platforms. Also, according to POSIX, PTHREAD_STACK_MIN is defined in limits.h, so include climits just to be safe.
This commit is contained in:
committed by
Robin Gareus
parent
662ff1bd39
commit
e3dcd1f5d7
@@ -23,7 +23,8 @@
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
#if !defined PLATFORM_WINDOWS && defined __GLIBC__
|
||||
#include <climits>
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
@@ -227,7 +228,7 @@ static size_t
|
||||
pbd_stack_size ()
|
||||
{
|
||||
size_t rv = 0;
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
#if !defined PLATFORM_WINDOWS && defined __GLIBC__
|
||||
|
||||
size_t pt_min_stack = 16384;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user