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
This commit is contained in:
Kyle Evans 2020-03-28 17:00:38 +00:00
parent f30cf5588a
commit cddf6d61d1
3 changed files with 4 additions and 2 deletions

View File

@ -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
}

View File

@ -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 **);

View File

@ -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
}