aboutsummaryrefslogtreecommitdiffstats
path: root/meta-filesystems/recipes-filesystems/owfs/owfs/0001-Fix-compilation-with-GCC10.patch
blob: 6426ecb24788f80a7aa1d0777d17a06c9b663117 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From a812202d22a2861318b8e39f1cd74cd222f8e76f Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
Date: Tue, 9 Jun 2020 11:30:38 +0300
Subject: [PATCH] Fix compilation with GCC10

Fixed compilation with -fno-common, which enabled in GCC 10 by default.
See https://bugs.gentoo.org/707438.

Upstream-Status: Backport [https://github.com/owfs/owfs/pull/62]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 module/owserver/src/c/owserver.c       | 2 ++
 module/owserver/src/include/owserver.h | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/module/owserver/src/c/owserver.c b/module/owserver/src/c/owserver.c
index db29988e..2ed29161 100644
--- a/module/owserver/src/c/owserver.c
+++ b/module/owserver/src/c/owserver.c
@@ -36,6 +36,8 @@
 
 #include "owserver.h"
 
+pthread_mutex_t persistence_mutex ;
+
 /* --- Prototypes ------------ */
 static void SetupAntiloop(int argc, char **argv);
 
diff --git a/module/owserver/src/include/owserver.h b/module/owserver/src/include/owserver.h
index 8be582f0..a257ed02 100644
--- a/module/owserver/src/include/owserver.h
+++ b/module/owserver/src/include/owserver.h
@@ -18,7 +18,7 @@
 #include "ow.h"
 #include "ow_connection.h"
 
-pthread_mutex_t persistence_mutex ;
+extern pthread_mutex_t persistence_mutex ;
 #define PERSISTENCELOCK    _MUTEX_LOCK(   persistence_mutex ) ;
 #define PERSISTENCEUNLOCK  _MUTEX_UNLOCK( persistence_mutex ) ;
 
-- 
2.28.0