From b33a1e1766d1fade064d8c4203eb3ce26360da91 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 12 Jun 2018 09:39:44 -0700 Subject: [PATCH] runtime: workaround GCC 4.8 libstdc++ C++11 conformance libstdc++ included with GCC 4.8 does not define `std::max_align_t` as required by the C++11 specification. As a workaround, explicitly create the definition locally. This was fixed in GCC 4.9 and later. --- stdlib/public/runtime/Casting.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stdlib/public/runtime/Casting.cpp b/stdlib/public/runtime/Casting.cpp index 5be857d5fd7e2..e1542177e39e3 100644 --- a/stdlib/public/runtime/Casting.cpp +++ b/stdlib/public/runtime/Casting.cpp @@ -44,6 +44,11 @@ #include #include +#if defined(__GLIBCXX__) && __GLIBCXX__ < 20160726 +#include +namespace std { using ::max_align_t; } +#endif + using namespace swift; using namespace swift::hashable_support; using namespace metadataimpl;