Fixup clang Werror boost build on MacOSX
Fixes the Boost::Tuple header used by Boost::MultiIndex.
Change-Id: I98eb047e699e04934ee09323633e28cecef84e70
diff --git a/external/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk
index 604f882..0bdb6eb 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -40,6 +40,10 @@ boost_patches += boost_1_60_0.quadmath.patch
boost_patches += boost_1_60_0.undef.warning.patch
boost_patches += boost_1_60_0.android.undef.warning.patch
# This patch is from upstream
# https://github.com/boostorg/tuple/commit/8b6613e592824b30d48a9252604172abfa33c5f2
boost_patches += boost.tuple_basic.Wundef.warnings.patch
$(eval $(call gb_UnpackedTarball_UnpackedTarball,boost))
$(eval $(call gb_UnpackedTarball_set_tarball,boost,$(BOOST_TARBALL)))
diff --git a/external/boost/boost.tuple_basic.Wundef.warnings.patch b/external/boost/boost.tuple_basic.Wundef.warnings.patch
new file mode 100644
index 0000000..778f4cc
--- /dev/null
+++ b/external/boost/boost.tuple_basic.Wundef.warnings.patch
@@ -0,0 +1,34 @@
From 8b6613e592824b30d48a9252604172abfa33c5f2 Mon Sep 17 00:00:00 2001
From: Dmitry Marakasov <amdmi3@amdmi3.ru>
Date: Tue, 1 Mar 2016 13:54:12 +0300
Subject: [PATCH] Only check for BOOST_GCC when it's defined
This fixes warnings with clang:
/usr/local/include/boost/tuple/detail/tuple_basic.hpp:44:5: warning: 'BOOST_GCC' is not defined, evaluates to 0 [-Wundef]
---
include/boost/tuple/detail/tuple_basic.hpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/boost/tuple/detail/tuple_basic.hpp b/include/boost/tuple/detail/tuple_basic.hpp
index 9a3b34e..a688309 100644
--- a/a/include/boost/tuple/detail/tuple_basic.hpp
+++ b/b/include/boost/tuple/detail/tuple_basic.hpp
@@ -41,7 +41,7 @@
#include "boost/detail/workaround.hpp" // needed for BOOST_WORKAROUND
-#if BOOST_GCC >= 40700
+#if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#endif
@@ -979,7 +979,7 @@ inline void swap(tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>& lhs,
} // end of namespace boost
-#if BOOST_GCC >= 40700
+#if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
#pragma GCC diagnostic pop
#endif