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 ed0d149
Show file tree
Hide file tree
Showing 3 changed files with 5 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
2 changes: 2 additions & 0 deletions tests/zfs-tests/tests/functional/checksum/edonr_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include <sys/time.h>
#include <sys/stdtypes.h>

int aok;

/*
* Test messages from:
* http://csrc.nist.gov/groups/ST/toolkit/documents/Examples/SHA_All.pdf
Expand Down

0 comments on commit ed0d149

Please sign in to comment.