about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--include/features.h4
-rw-r--r--misc/sys/cdefs.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/include/features.h b/include/features.h
index 2d4debbe24..ab2b2caac4 100644
--- a/include/features.h
+++ b/include/features.h
@@ -412,7 +412,9 @@
 #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
 # elif !__GNUC_PREREQ (4, 1)
 #  warning _FORTIFY_SOURCE requires GCC 4.1 or later
-# elif _FORTIFY_SOURCE > 2 && __glibc_clang_prereq (9, 0)
+# elif _FORTIFY_SOURCE > 2 && (__glibc_clang_prereq (9, 0)		      \
+			       || __GNUC_PREREQ (12, 0))
+
 #  if _FORTIFY_SOURCE > 3
 #   warning _FORTIFY_SOURCE > 3 is treated like 3 on this platform
 #  endif
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index abf13a9086..44d3826bca 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -143,7 +143,8 @@
 #define __bos0(ptr) __builtin_object_size (ptr, 0)
 
 /* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available.  */
-#if __USE_FORTIFY_LEVEL == 3 && __glibc_clang_prereq (9, 0)
+#if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0)		      \
+				 || __GNUC_PREREQ (12, 0))
 # define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
 # define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
 #else