[openwrt/openwrt] kernel: fix jffs2 compilation with GCC_PLUGIN_RANDSTRUCT enabled

LEDE Commits lede-commits at lists.infradead.org
Mon Sep 13 09:37:28 PDT 2021


hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/55643e469c21ae268cd9842705ae064404094f07

commit 55643e469c21ae268cd9842705ae064404094f07
Author: Matt Merhar <mattmerhar at protonmail.com>
AuthorDate: Mon Sep 6 19:32:48 2021 -0400

    kernel: fix jffs2 compilation with GCC_PLUGIN_RANDSTRUCT enabled
    
    Designated initializers are required when using the randstruct GCC
    plugin, otherwise an error like the following is seen:
    
    ./include/linux/lzma.h:60:31: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]
    
    Signed-off-by: Matt Merhar <mattmerhar at protonmail.com>
---
 target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch | 2 +-
 target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch
index 1bccb30a69..c794c6fe8f 100644
--- a/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch
+++ b/target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch
@@ -351,7 +351,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex at ozo.com>
 +		LZMA_FREE(address);
 +}
 +
-+static ISzAlloc lzma_alloc = {p_lzma_malloc, p_lzma_free};
++static ISzAlloc lzma_alloc = { .Alloc = p_lzma_malloc, .Free = p_lzma_free };
 +
 +#endif
 --- /dev/null
diff --git a/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch
index 052db7ef5c..8bd31d2e7e 100644
--- a/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch
+++ b/target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch
@@ -351,7 +351,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex at ozo.com>
 +		LZMA_FREE(address);
 +}
 +
-+static ISzAlloc lzma_alloc = {p_lzma_malloc, p_lzma_free};
++static ISzAlloc lzma_alloc = { .Alloc = p_lzma_malloc, .Free = p_lzma_free };
 +
 +#endif
 --- /dev/null



More information about the lede-commits mailing list