aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-03-28 17:00:38 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-03-28 17:00:38 +0000
commitcddf6d61d133b6269379a650e3b67b5d93751077 (patch)
treec8beecb1755719711eef876d955c31a383b5a4de
parentf30cf5588aa13bd34a9327734e88e9a12e1283e1 (diff)
downloadsrc-cddf6d61d133b6269379a650e3b67b5d93751077.tar.gz
src-cddf6d61d133b6269379a650e3b67b5d93751077.zip
zfs: fix -fno-common issues
A similar (or identical?) fix has already landed in OpenZFS. -fno-common will become the default in GCC10/LLVM11. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=359397
-rw-r--r--cddl/contrib/opensolaris/cmd/zfs/zfs_util.h2
-rw-r--r--cddl/contrib/opensolaris/cmd/zpool/zpool_main.c2
-rw-r--r--cddl/contrib/opensolaris/cmd/zpool/zpool_util.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h b/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h
index 3ddff9e22d7d..a56af59adb15 100644
--- a/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h
+++ b/cddl/contrib/opensolaris/cmd/zfs/zfs_util.h
@@ -33,7 +33,7 @@ extern "C" {
void * safe_malloc(size_t size);
void nomem(void);
-libzfs_handle_t *g_zfs;
+extern libzfs_handle_t *g_zfs;
#ifdef __cplusplus
}
diff --git a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
index d4e0a73ade67..414f26756acd 100644
--- a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
+++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
@@ -64,6 +64,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/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h b/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h
index 8777edc9de17..118029a22866 100644
--- a/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h
+++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_util.h
@@ -64,7 +64,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;
#ifdef __cplusplus
}