From 303b9da6847c65dbd28b1f6749a4db67eade23f3 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Fri, 14 May 2021 11:23:05 +0200 Subject: [PATCH] Fix Linxu build --- Source/ThirdParty/concurrentqueue.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/ThirdParty/concurrentqueue.h b/Source/ThirdParty/concurrentqueue.h index 8f1d5b58f..baa4a6c21 100644 --- a/Source/ThirdParty/concurrentqueue.h +++ b/Source/ThirdParty/concurrentqueue.h @@ -44,6 +44,7 @@ #include #include +#include #include #include #include @@ -156,7 +157,11 @@ namespace details { : static_cast(-1); }; - typedef std::max_align_t std_max_align_t; +#if defined(__GLIBCXX__) + typedef ::max_align_t std_max_align_t; // libstdc++ forgot to add it to std:: for a while +#else + typedef std::max_align_t std_max_align_t; // Others (e.g. MSVC) insist it can *only* be accessed via std:: +#endif // Some platforms have incorrectly set max_align_t to a type with <8 bytes alignment even while supporting // 8-byte aligned scalar values (*cough* 32-bit iOS). Work around this with our own union. See issue #64.