From 55643e469c21ae268cd9842705ae064404094f07 Mon Sep 17 00:00:00 2001 From: Matt Merhar Date: Mon, 6 Sep 2021 19:32:48 -0400 Subject: [PATCH] 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 --- .../generic/pending-5.10/530-jffs2_make_lzma_available.patch | 2 +- .../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 1bccb30a69f..c794c6fe8f7 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 + 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 052db7ef5c4..8bd31d2e7e5 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 + 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 -- 2.30.2