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.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Paul Zuchowski <[email protected]>
Signed-off-by: Nick Black <[email protected]>
Closes openzfs#9752
  • Loading branch information
dankamongmen authored and behlendorf committed Dec 26, 2019
1 parent 635a01a commit 8cda5c5
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 = 0;

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 = 0;

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

0 comments on commit 8cda5c5

Please sign in to comment.