Skip to content

Commit

Permalink
Workaround deprecated ::getpagesize().
Browse files Browse the repository at this point in the history
  • Loading branch information
viboes committed Aug 13, 2017
1 parent 9579dc2 commit 24a22b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/boost/thread/pthread/thread_data.hpp
Expand Up @@ -50,7 +50,11 @@ namespace boost
// stack
void set_stack_size(std::size_t size) BOOST_NOEXCEPT {
if (size==0) return;
#ifdef BOOST_THREAD_USES_GETPAGESIZE
std::size_t page_size = getpagesize();
#else
std::size_t page_size = ::sysconf( _SC_PAGESIZE);
#endif
#ifdef PTHREAD_STACK_MIN
if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
#endif
Expand Down

0 comments on commit 24a22b6

Please sign in to comment.