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
@@ -318,8 +318,8 @@ vdev_raidz_cksum_report(zio_t *zio, zio_cksum_report_t *zcr, void *arg)
}
static const zio_vsd_ops_t vdev_raidz_vsd_ops = {
vdev_raidz_map_free_vsd,
vdev_raidz_cksum_report
.vsd_free = vdev_raidz_map_free_vsd,
.vsd_cksum_report = vdev_raidz_cksum_report
};
/*