From 9f438aa773a68a2c7222f7ac785cea41bf3d1c10 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 15 Sep 2024 00:19:26 +0200 Subject: [PATCH] Add workaround to compile w/c++17 and old boost on macOS This can be removed once the buildstack has been updated to use recent boost. --- wscript | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wscript b/wscript index 5122e9a469..79bf4cb9cc 100644 --- a/wscript +++ b/wscript @@ -590,6 +590,9 @@ int main() { return 0; }''', linker_flags.append('--stdlib=libstdc++') # Prevents visibility issues in standard headers conf.define("_DARWIN_C_SOURCE", 1) + # C++17 removes 'unary_function' and 'binary_function' this breaks older boost versions + # prior to boost 1.81.0 + cxx_flags.append('-D_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION') else: cxx_flags.append('-DBOOST_NO_AUTO_PTR') cxx_flags.append('-DBOOST_BIND_GLOBAL_PLACEHOLDERS')