glibc/glibc-upstream-2.34-366.patch
Arjun Shankar 1bc41d2121 Sync with upstream branch release/2.34/master
Upstream commit: a4217408a3d6050a7f42ac23adb6ac7218dca85f

- Apply asm redirections in syslog.h before first use [BZ #27087]
- _Static_assert needs two arguments for compatibility with GCC before 9

Resolves: #2142974
Related: #2149102
Related: #2142935 (actually fixed in fb3d49c3bf)
2022-12-07 15:15:59 +01:00

30 lines
1011 B
Diff

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