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 Tony Hutter
parent 68ba1d2fa9
commit e06711412b
12 changed files with 126 additions and 124 deletions
+3 -1
View File
@@ -36,7 +36,9 @@ static int mod_infonull(void *, struct modlinkage *, int *);
* Cryptographic Modules
*/
struct mod_ops mod_cryptoops = {
mod_null, mod_null, mod_infonull
.modm_install = mod_null,
.modm_remove = mod_null,
.modm_info = mod_infonull
};
/*