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 <behlendorf1@llnl.gov>
Signed-off-by: Mark Wright <gienah@gentoo.org>
Closes #5390 
Closes #6903
This commit is contained in:
Mark Wright
2017-11-29 10:33:48 +11:00
committed by Brian Behlendorf
parent 48ac22d855
commit 56d8d8ace4
12 changed files with 126 additions and 124 deletions
+2 -2
View File
@@ -168,8 +168,8 @@ vdev_mirror_map_free(zio_t *zio)
}
static const zio_vsd_ops_t vdev_mirror_vsd_ops = {
vdev_mirror_map_free,
zio_vsd_default_cksum_report
.vsd_free = vdev_mirror_map_free,
.vsd_cksum_report = zio_vsd_default_cksum_report
};
static int