1From 43a4bc6b750c37f585d03b14941f3633ed5348d8 Mon Sep 17 00:00:00 2001 2From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com> 3Date: Tue, 9 Jun 2020 11:30:38 +0300 4Subject: [PATCH] Fix compilation with GCC10 5 6Fixed compilation with -fno-common, which enabled in GCC 10 by default. 7See https://bugs.gentoo.org/707438. 8[Retrieved from: 9https://github.com/owfs/owfs/commit/43a4bc6b750c37f585d03b14941f3633ed5348d8] 10Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 11--- 12 module/owserver/src/c/owserver.c | 2 ++ 13 module/owserver/src/include/owserver.h | 2 +- 14 2 files changed, 3 insertions(+), 1 deletion(-) 15 16diff --git a/module/owserver/src/c/owserver.c b/module/owserver/src/c/owserver.c 17index db29988e..2ed29161 100644 18--- a/module/owserver/src/c/owserver.c 19+++ b/module/owserver/src/c/owserver.c 20@@ -36,6 +36,8 @@ 21 22 #include "owserver.h" 23 24+pthread_mutex_t persistence_mutex ; 25+ 26 /* --- Prototypes ------------ */ 27 static void SetupAntiloop(int argc, char **argv); 28 29diff --git a/module/owserver/src/include/owserver.h b/module/owserver/src/include/owserver.h 30index 8be582f0..a257ed02 100644 31--- a/module/owserver/src/include/owserver.h 32+++ b/module/owserver/src/include/owserver.h 33@@ -18,7 +18,7 @@ 34 #include "ow.h" 35 #include "ow_connection.h" 36 37-pthread_mutex_t persistence_mutex ; 38+extern pthread_mutex_t persistence_mutex ; 39 #define PERSISTENCELOCK _MUTEX_LOCK( persistence_mutex ) ; 40 #define PERSISTENCEUNLOCK _MUTEX_UNLOCK( persistence_mutex ) ; 41 42