Boost C++ Libraries: Ticket #13155: log doesn't build on a system with pthreads https://svn.boost.org/trac10/ticket/13155 <p> On Oracle Linux 7.3: sun.compile.c++ bin.v2/libs/log/build/sun/release/stdlib-sun-stlport/threading-m ulti/severity_level.o "./boost/thread/pthread/thread_data.hpp", line 53: Error: The function "getpages ize" must have a prototype. 1 Error(s) detected. </p> <pre class="wiki"> "CC" -compat=5 -features=zla -library=stlport4 -xO4 -mt -erroff=%none -m64 -KPIC -DBOOST_ALL_NO_LIB=1 -DBOOST_ATOMIC_DYN_LINK=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_DATE_TIME_DYN_LINK=1 -DBOOST_FILESYSTEM_DYN_LINK=1 -DBOOST_LOG_BUILDING_THE_LIB=1 -DBOOST_LOG_DLL -DBOOST_LOG_HAS_PTHREAD_MUTEX_ROBUST -DBOOST_LOG_USE_NATIVE_SYSLOG -DBOOST_LOG_WITHOUT_DEBUG_OUTPUT -DBOOST_LOG_WITHOUT_EVENT_LOG -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_DONT_USE_CHRONO=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -DDATE_TIME_INLINE -DNDEBUG -D_XOPEN_SOURCE=600 -D__STDC_CONSTANT_MACROS -D__typeof__=__typeof__ -I"." -I"libs/log/src" -c -o "bin.v2/libs/log/build/sun/release/stdlib-sun-stlport/threading-multi/severity_level.o" "libs/log/src/severity_level.cpp" </pre><p> Log requests _XOPEN_SOURCE=600 (meaning the POSIX.1-2001 specification), yet at the same time, this removes the getpagesize() declaration (see getpagesize(2): "In SUSv2 the getpagesize() call is labeled LEGACY, and in POSIX.1-2001 it has been dropped"). </p> <p> This patch should fix the problem: </p> <pre class="wiki">diff --git a/include/boost/thread/pthread/thread_data.hpp b/include/boost/thread index 836e692..7bf360d 100644 --- a/include/boost/thread/pthread/thread_data.hpp +++ b/include/boost/thread/pthread/thread_data.hpp @@ -50,7 +50,7 @@ namespace boost // stack void set_stack_size(std::size_t size) BOOST_NOEXCEPT { if (size==0) return; - std::size_t page_size = getpagesize(); + std::size_t page_size = ::sysconf( _SC_PAGESIZE); #ifdef PTHREAD_STACK_MIN if (size&lt;PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN; #endif </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13155 Trac 1.4.3 maxim.kartashev@… Thu, 10 Aug 2017 12:18:31 GMT <link>https://svn.boost.org/trac10/ticket/13155#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13155#comment:1</guid> <description> <p> Pull request: <a class="ext-link" href="https://github.com/boostorg/thread/pull/128"><span class="icon">​</span>https://github.com/boostorg/thread/pull/128</a> </p> </description> <category>Ticket</category> </item> <item> <author>maxim.kartashev@…</author> <pubDate>Mon, 14 Aug 2017 08:49:00 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/13155#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13155#comment:2</guid> <description> <p> Resolved by <a class="ext-link" href="https://github.com/boostorg/thread/commit/24a22b66ef729a645788f13e5127044f867478bc"><span class="icon">​</span>https://github.com/boostorg/thread/commit/24a22b66ef729a645788f13e5127044f867478bc</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Tue, 22 Aug 2017 20:59:53 GMT</pubDate> <title>owner, status, milestone changed https://svn.boost.org/trac10/ticket/13155#comment:3 https://svn.boost.org/trac10/ticket/13155#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.65.0</span> </li> </ul> Ticket viboes Tue, 22 Aug 2017 21:00:06 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/13155#comment:4 https://svn.boost.org/trac10/ticket/13155#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket