From 893bb7024565bf9e23f3557e2727d71391e2160e Mon Sep 17 00:00:00 2001 From: nick black Date: Fri, 20 Dec 2019 04:57:55 -0500 Subject: [PATCH] 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. Signed-off-by: Nick Black --- lib/libspl/include/assert.h | 2 +- lib/libspl/zone.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libspl/include/assert.h b/lib/libspl/include/assert.h index 19b25f7dd825..1b8f6befb9d5 100644 --- a/lib/libspl/include/assert.h +++ b/lib/libspl/include/assert.h @@ -34,7 +34,7 @@ #include #ifndef _KERNEL -int aok; +extern int aok; #endif static inline int diff --git a/lib/libspl/zone.c b/lib/libspl/zone.c index 5ca93b224d9e..fb33ebaee7f8 100644 --- a/lib/libspl/zone.c +++ b/lib/libspl/zone.c @@ -27,6 +27,8 @@ #include #include +int aok; + zoneid_t getzoneid() {