1feee8
commit a1c12fdf3f9b8665719835ce8330b3b2e2574b37
1feee8
Author: Florian Weimer <fweimer@redhat.com>
1feee8
Date:   Fri Sep 10 13:18:36 2021 +0200
1feee8
1feee8
    _Static_assert needs two arguments for compatibility with GCC before 9
1feee8
    
1feee8
    This macro definition enforces two arguments even with newer compilers
1feee8
    that accept the single-argument form, too.
1feee8
    
1feee8
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
1feee8
    (cherry picked from commit c9fef4b7d1d0f2dad192c74f06102752247677a9)
1feee8
1feee8
diff --git a/include/sys/cdefs.h b/include/sys/cdefs.h
1feee8
index 6a76160ed4e4cabb..56adb231aa8f8cbe 100644
1feee8
--- a/include/sys/cdefs.h
1feee8
+++ b/include/sys/cdefs.h
1feee8
@@ -1,5 +1,12 @@
1feee8
 #ifndef _SYS_CDEFS_H
1feee8
 
1feee8
+/* This is outside of _ISOMAC to enforce that _Static_assert always
1feee8
+   uses the two-argument form.  This can be removed once the minimum
1feee8
+   GCC version used to compile glibc is GCC 9.1.  */
1feee8
+#ifndef __cplusplus
1feee8
+# define _Static_assert(expr, diagnostic) _Static_assert (expr, diagnostic)
1feee8
+#endif
1feee8
+
1feee8
 #include <misc/sys/cdefs.h>
1feee8
 
1feee8
 #ifndef _ISOMAC