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

LEDE Commits lede-commits at lists.infradead.org
Sun Oct 29 03:33:46 PDT 2023


ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/aaa1286b89a058bab2d23f55182453bf1f5a5e69

commit aaa1286b89a058bab2d23f55182453bf1f5a5e69
Author: Matt Merhar <mattmerhar at protonmail.com>
AuthorDate: Sat Oct 28 21:15:46 2023 -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]
    
    This was originally applied via 55643e469c21, but was unintentionally
    reverted in 483503603cb2.
    
    Fixes: 483503603cb2 ("generic: 5.15: rework pending patch")
    Signed-off-by: Matt Merhar <mattmerhar at protonmail.com>
    (cherry picked from commit b2068f4aac43754a681b675ff3814d9ca87ac986)
    [ drop change for unavailable kernel 6.1 ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch b/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch
index ac784d0b0b..f236657b71 100644
--- a/target/linux/generic/pending-5.15/530-jffs2_make_lzma_available.patch
+++ b/target/linux/generic/pending-5.15/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