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:
Matthias von Faber 2020-06-08 07:08:41 +02:00 committed by Robin Gareus
parent 662ff1bd39
commit e3dcd1f5d7
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -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;