Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Fix p0 initializer
Browse files Browse the repository at this point in the history
Due to changes in the task_struct the following warning is occurs
when initializing the global p0.  Since this structure only exists
for it's address to be taken initialize it in a manor which isn't
sensitive to internal changes to the structure.

  module/spl/spl-generic.c:58:1: error: missing braces around
  initializer [-Werror=missing-braces]

Signed-off-by: Brian Behlendorf <[email protected]>
Closes #576
  • Loading branch information
behlendorf authored Oct 5, 2016
1 parent 6c2a66b commit 341dfdb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/spl/spl-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ EXPORT_SYMBOL(spl_hostid);
module_param(spl_hostid, ulong, 0644);
MODULE_PARM_DESC(spl_hostid, "The system hostid.");

proc_t p0 = { 0 };
proc_t p0;
EXPORT_SYMBOL(p0);

/*
Expand Down Expand Up @@ -660,6 +660,7 @@ spl_init(void)
{
int rc = 0;

bzero(&p0, sizeof (proc_t));
spl_random_init();

if ((rc = spl_kvmem_init()))
Expand Down

0 comments on commit 341dfdb

Please sign in to comment.