aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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 /lib
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 'lib')
-rw-r--r--lib/libshare/smb.c2
-rw-r--r--lib/libshare/smb.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/libshare/smb.c b/lib/libshare/smb.c
index a95607ee0..f567f7c49 100644
--- a/lib/libshare/smb.c
+++ b/lib/libshare/smb.c
@@ -65,6 +65,8 @@ static boolean_t smb_available(void);
static sa_fstype_t *smb_fstype;
+smb_share_t *smb_shares;
+
/*
* Retrieve the list of SMB shares.
*/
diff --git a/lib/libshare/smb.h b/lib/libshare/smb.h
index 7a0c0fd16..8ea44677f 100644
--- a/lib/libshare/smb.h
+++ b/lib/libshare/smb.h
@@ -44,6 +44,6 @@ typedef struct smb_share_s {
struct smb_share_s *next;
} smb_share_t;
-smb_share_t *smb_shares;
+extern smb_share_t *smb_shares;
void libshare_smb_init(void);