Fix CONFIG_GCC_PLUGIN_RANDSTRUCT build

Fix build errors with gcc 7.3.0 on Gentoo with kernel 4.16.3
built with CONFIG_GCC_PLUGIN_RANDSTRUCT=y such as:

module/zfs/vdev_indirect.c:296:2: error:
positional initialization of field in ‘struct’ declared with
‘designated_init’ attribute [-Werror=designated-init]
  vdev_indirect_map_free,
  ^~~~~~~~~~~~~~~~~~~~~~

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Mark Wright <gienah@gentoo.org>
Closes #7464
This commit is contained in:
Mark Wright 2018-04-21 02:53:25 +10:00 committed by Brian Behlendorf
parent b4555c777a
commit 089500e792
1 changed files with 2 additions and 2 deletions

View File

@ -293,8 +293,8 @@ vdev_indirect_map_free(zio_t *zio)
}
static const zio_vsd_ops_t vdev_indirect_vsd_ops = {
vdev_indirect_map_free,
zio_vsd_default_cksum_report
.vsd_free = vdev_indirect_map_free,
.vsd_cksum_report = zio_vsd_default_cksum_report
};
/*