diff options
author | Matthias Van Parys <matthias.vanparys@softathome.com> | 2023-07-11 10:47:53 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2023-08-11 12:53:33 +0200 |
commit | 26093cbc888c530481a4ac506608c819a889b32b (patch) | |
tree | 05d9792e3c9c31e4d9f7de3d4c174bad764b2398 /toolchain | |
parent | e99745659539e28102abd7421d418ec2dd7e3bc2 (diff) | |
download | upstream-26093cbc888c530481a4ac506608c819a889b32b.tar.gz upstream-26093cbc888c530481a4ac506608c819a889b32b.tar.bz2 upstream-26093cbc888c530481a4ac506608c819a889b32b.zip |
fortify-headers: add __extension__ mark to strings.h
Add the __extension__ mark before #include_next in strings.h
to avoid a compiler error when -pedantic is enabled.
This has been done for all other headers in the past.
Signed-off-by: Matthias Van Parys <matthias.vanparys@softathome.com>
(cherry picked from commit 2425d6df121082a8643459ac7996334779792a59)
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/fortify-headers/patches/002-strings.h-add-__extension__-mark.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/toolchain/fortify-headers/patches/002-strings.h-add-__extension__-mark.patch b/toolchain/fortify-headers/patches/002-strings.h-add-__extension__-mark.patch new file mode 100644 index 0000000000..001e578e60 --- /dev/null +++ b/toolchain/fortify-headers/patches/002-strings.h-add-__extension__-mark.patch @@ -0,0 +1,29 @@ +From 9ee4b9bd8df55ebbd5f6426fda4a36e1958b64c5 Mon Sep 17 00:00:00 2001 +From: Matthias Van Parys <matthias.vanparys@softathome.com> +Date: Mon, 10 Jul 2023 14:31:05 +0200 +Subject: [PATCH] strings.h: Add __extension__ mark to include_next to silence + -pedantic + +Add __extension__ before #include-next in strings.h as was done for all other header files in commits +7fd984fcb532be01f68cddc194c09a7ca10c1ea6 and a9ffac8596b094da8563aa5dd5d81c946670afe +--- + include/strings.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/include/strings.h b/include/strings.h +index a16e1ad..d1902db 100644 +--- a/include/strings.h ++++ b/include/strings.h +@@ -16,6 +16,9 @@ + #ifndef _FORTIFY_STRINGS_H + #define _FORTIFY_STRINGS_H + ++#ifndef __cplusplus ++__extension__ ++#endif + #include_next <strings.h> + + #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 +-- +2.34.1 + |