diff options
author | Nick Black <[email protected]> | 2019-12-26 13:52:14 -0500 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-12-26 10:52:14 -0800 |
commit | 8cda5c5ce9dfd26591fa26b7be17347ef6091250 (patch) | |
tree | d0f59f21ef75e64da235071e7cfc8c3bf16e862f /lib/libspl | |
parent | 635a01aafdd7191e32cd1228e96dc90ddfe0d899 (diff) |
libspl: declare aok extern in header
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 #9752
Diffstat (limited to 'lib/libspl')
-rw-r--r-- | lib/libspl/include/assert.h | 2 | ||||
-rw-r--r-- | lib/libspl/zone.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/libspl/include/assert.h b/lib/libspl/include/assert.h index 19b25f7dd..1b8f6befb 100644 --- a/lib/libspl/include/assert.h +++ b/lib/libspl/include/assert.h @@ -34,7 +34,7 @@ #include <stdarg.h> #ifndef _KERNEL -int aok; +extern int aok; #endif static inline int diff --git a/lib/libspl/zone.c b/lib/libspl/zone.c index 5ca93b224..4a0e600ca 100644 --- a/lib/libspl/zone.c +++ b/lib/libspl/zone.c @@ -27,6 +27,8 @@ #include <string.h> #include <errno.h> +int aok = 0; + zoneid_t getzoneid() { |