aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zpool
diff options
context:
space:
mode:
authorRomain Dolbeau <[email protected]>2020-02-06 18:25:29 +0100
committerGitHub <[email protected]>2020-02-06 09:25:29 -0800
commitaf09c050e95bebbaeca52156218f3f91e8c9951a (patch)
tree3d294ab006d5bfd19213f218849e02c1ade8e306 /cmd/zpool
parent5b7e6a36175c1c13803785557b17977d2a9ecd9d (diff)
Fix static data to link with -fno-common
-fno-common is the new default in GCC 10, replacing -fcommon in GCC <= 9, so static data must only be allocated once. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Romain Dolbeau <[email protected]> Closes #9943
Diffstat (limited to 'cmd/zpool')
-rw-r--r--cmd/zpool/zpool_main.c2
-rw-r--r--cmd/zpool/zpool_util.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index ae5e8a370..ff4f44d46 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -76,6 +76,8 @@
#include "statcommon.h"
+libzfs_handle_t *g_zfs;
+
static int zpool_do_create(int, char **);
static int zpool_do_destroy(int, char **);
diff --git a/cmd/zpool/zpool_util.h b/cmd/zpool/zpool_util.h
index ce760df72..1f23f61aa 100644
--- a/cmd/zpool/zpool_util.h
+++ b/cmd/zpool/zpool_util.h
@@ -79,7 +79,7 @@ void pool_list_free(zpool_list_t *);
int pool_list_count(zpool_list_t *);
void pool_list_remove(zpool_list_t *, zpool_handle_t *);
-libzfs_handle_t *g_zfs;
+extern libzfs_handle_t *g_zfs;
typedef struct vdev_cmd_data