From 56d8d8ace4724bde16145be25b75d8f551961813 Mon Sep 17 00:00:00 2001 From: Mark Wright Date: Wed, 29 Nov 2017 10:33:48 +1100 Subject: Linux 4.14 compat: CONFIG_GCC_PLUGIN_RANDSTRUCT Fix build errors with gcc 7.2.0 on Gentoo with kernel 4.14 built with CONFIG_GCC_PLUGIN_RANDSTRUCT=y such as: module/nvpair/nvpair.c:2810:2:error: positional initialization of field in ?struct? declared with 'designated_init' attribute [-Werror=designated-init] nvs_native_nvlist, ^~~~~~~~~~~~~~~~~ Reviewed-by: Brian Behlendorf Signed-off-by: Mark Wright Closes #5390 Closes #6903 --- module/nvpair/nvpair_alloc_fixed.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/nvpair/nvpair_alloc_fixed.c') diff --git a/module/nvpair/nvpair_alloc_fixed.c b/module/nvpair/nvpair_alloc_fixed.c index e3ac12938..0d4e12b97 100644 --- a/module/nvpair/nvpair_alloc_fixed.c +++ b/module/nvpair/nvpair_alloc_fixed.c @@ -110,11 +110,11 @@ nv_fixed_reset(nv_alloc_t *nva) } const nv_alloc_ops_t nv_fixed_ops_def = { - nv_fixed_init, /* nv_ao_init() */ - NULL, /* nv_ao_fini() */ - nv_fixed_alloc, /* nv_ao_alloc() */ - nv_fixed_free, /* nv_ao_free() */ - nv_fixed_reset /* nv_ao_reset() */ + .nv_ao_init = nv_fixed_init, + .nv_ao_fini = NULL, + .nv_ao_alloc = nv_fixed_alloc, + .nv_ao_free = nv_fixed_free, + .nv_ao_reset = nv_fixed_reset }; const nv_alloc_ops_t *nv_fixed_ops = &nv_fixed_ops_def; -- cgit v1.2.3