From e3dcd1f5d7b8a3a760bce9b2f24a4a4407cb60c4 Mon Sep 17 00:00:00 2001 From: Matthias von Faber Date: Mon, 8 Jun 2020 07:08:41 +0200 Subject: [PATCH] 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. --- libs/pbd/pthread_utils.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/pbd/pthread_utils.cc b/libs/pbd/pthread_utils.cc index 8522950751..2fe3388dbe 100644 --- a/libs/pbd/pthread_utils.cc +++ b/libs/pbd/pthread_utils.cc @@ -23,7 +23,8 @@ #include #include -#ifndef PLATFORM_WINDOWS +#if !defined PLATFORM_WINDOWS && defined __GLIBC__ +#include #include #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;