kernel: fix jffs2 compilation with GCC_PLUGIN_RANDSTRUCT enabled
authorMatt Merhar <mattmerhar@protonmail.com>
Mon, 6 Sep 2021 23:32:48 +0000 (19:32 -0400)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 13 Sep 2021 15:08:12 +0000 (17:08 +0200)
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@protonmail.com>
target/linux/generic/pending-5.10/530-jffs2_make_lzma_available.patch
target/linux/generic/pending-5.4/530-jffs2_make_lzma_available.patch

index 1bccb30a69f69ff8e2e70a747b1f3b25d1079c8f..c794c6fe8f734b9efa8f8b18a17192339f1d9e8f 100644 (file)
@@ -351,7 +351,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@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
index 052db7ef5c4917a32622dea2f6c79487bbce720d..8bd31d2e7e53d873583f5066372eb0a996cb9475 100644 (file)
@@ -351,7 +351,7 @@ Signed-off-by: Alexandros C. Couloumbis <alex@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