changeset 3347:ab17e8e94776

fix build of Stone on OS X
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 18 Apr 2019 15:00:29 +0200
parents f509d3c6d570
children ef18ea68a362
files Resources/CMake/BoostConfiguration.cmake
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Resources/CMake/BoostConfiguration.cmake	Tue Apr 09 08:26:29 2019 +0200
+++ b/Resources/CMake/BoostConfiguration.cmake	Thu Apr 18 15:00:29 2019 +0200
@@ -147,6 +147,13 @@
       add_definitions(-DBOOST_HAS_SCHED_YIELD=1)
     endif()
 
+    # Fix for error: "boost_1_69_0/boost/chrono/detail/inlined/mac/thread_clock.hpp:54:28: 
+    # error: use of undeclared identifier 'pthread_mach_thread_np'"
+    # https://github.com/envoyproxy/envoy/pull/1785
+    if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+      add_definitions(-D_DARWIN_C_SOURCE=1)
+    endif()
+
   elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
     list(APPEND BOOST_SOURCES
       ${BOOST_SOURCES_DIR}/libs/thread/src/win32/tss_dll.cpp