Skip to content

Commit

Permalink
libspl: declare aok extern in header
Browse files Browse the repository at this point in the history
Rather than defining a new instance of 'aok' in every compilation
unit which includes this header, there is a single instance
defined in zone.c, and the header now only declares an extern.

Signed-off-by: Nick Black <[email protected]>
  • Loading branch information
dankamongmen committed Dec 20, 2019
1 parent 9fb2771 commit 893bb70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/libspl/include/assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <stdarg.h>

#ifndef _KERNEL
int aok;
extern int aok;
#endif

static inline int
Expand Down
2 changes: 2 additions & 0 deletions lib/libspl/zone.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include <string.h>
#include <errno.h>

int aok;

zoneid_t
getzoneid()
{
Expand Down

0 comments on commit 893bb70

Please sign in to comment.