From a09f6b5d033bb9cc52634833460409d4d815047b Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sat, 6 Nov 2021 13:37:21 +0000
Subject: Support GCC standard libraries which do not define __GLIBC_PREREQ
https://github.com/VcDevel/Vc/pull/282


diff --git a/Vc/global.h b/Vc/global.h
index 6f85b3c..fd9cdeb 100644
--- a/Vc/global.h
+++ b/Vc/global.h
@@ -132,7 +132,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #endif
 
 #ifdef Vc_GCC
-#  if Vc_GCC >= 0x70000 && defined __i386__ && (!defined __GLIBC_PREREQ || !__GLIBC_PREREQ(2,26))
+#  if Vc_GCC >= 0x70000 && defined __i386__
+     // GCC 7 changed alignof(max_align_t) to 16. glibc 2.26 followed with malloc in 2.26.
+     // 1. If GCC >= 7 and libc is not glibc max_align_t and malloc mismatch
+     // 2. If GCC >= 7 and libc is glibc < 2.26 max_align_t and malloc mismatch
+#    ifdef __GLIBC_PREREQ
+#      if __GLIBC_PREREQ(2,26)
+#        define Vc_HAVE_STD_MAX_ALIGN_T 1
+#      endif
+#    endif
      // GCC 7 changed alignof(max_align_t) to 16. glibc 2.26 followed with malloc in 2.26.
      // 1. If GCC >= 7 and libc is not glibc max_align_t and malloc mismatch
      // 2. If GCC >= 7 and libc is glibc < 2.26 max_align_t and malloc mismatch
-- 
2.30.2

