diff --git a/include/boost/thread/pthread/thread_data.hpp b/include/boost/thread/pthread/thread_data.hpp index aefbeb43c..719656b4c 100644 --- a/include/boost/thread/pthread/thread_data.hpp +++ b/include/boost/thread/pthread/thread_data.hpp @@ -32,6 +32,10 @@ # endif #endif +#ifdef __MINGW32__ +#include +#endif + #include #include @@ -52,7 +56,11 @@ namespace boost // stack void set_stack_size(std::size_t size) BOOST_NOEXCEPT { if (size==0) return; -#ifdef BOOST_THREAD_USES_GETPAGESIZE +#ifdef __MINGW32__ + SYSTEM_INFO si; + GetSystemInfo(&si); + std::size_t page_size = si.dwPageSize; +#elif defined(BOOST_THREAD_USES_GETPAGESIZE) std::size_t page_size = getpagesize(); #else std::size_t page_size = ::sysconf( _SC_PAGESIZE);