From 4655a4fad848d2d844c19e375d34e0bf3a6228dc Mon Sep 17 00:00:00 2001 From: markeryang Date: Fri, 13 Aug 2021 18:33:22 +0800 Subject: [PATCH] fix error PTHREAD_STACK_MIN Signed-off-by: markeryang Signed-off-by: lxk --- src/boost/boost/thread/pthread/thread_data.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/boost/boost/thread/pthread/thread_data.hpp b/src/boost/boost/thread/pthread/thread_data.hpp index aefbeb43..9e459b1f 100644 --- a/src/boost/boost/thread/pthread/thread_data.hpp +++ b/src/boost/boost/thread/pthread/thread_data.hpp @@ -57,8 +57,9 @@ namespace boost #else std::size_t page_size = ::sysconf( _SC_PAGESIZE); #endif -#if PTHREAD_STACK_MIN > 0 - if (size 0 && size < (std::size_t)PTHREAD_STACK_MIN) + size = (std::size_t)PTHREAD_STACK_MIN; #endif size = ((size+page_size-1)/page_size)*page_size; int res = pthread_attr_setstacksize(&val_, size); -- 2.23.0