aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-08-13 08:32:22 -0700
committerKhem Raj <raj.khem@gmail.com>2020-08-13 22:32:08 -0700
commit29de5fbc5e0f61033f9a4f145b3494edc7d3c58c (patch)
tree8df9d0193ac91d1046dff8d7271e945746e3c2fe
parent620ef0206fecb1a8e990fced8618ac4ef0b0c79d (diff)
downloadmeta-openembedded-contrib-29de5fbc5e0f61033f9a4f145b3494edc7d3c58c.tar.gz
owfs: Fix build with -fno-common
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-filesystems/recipes-filesystems/owfs/owfs/0001-Fix-compilation-with-GCC10.patch44
-rw-r--r--meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb1
2 files changed, 45 insertions, 0 deletions
diff --git a/meta-filesystems/recipes-filesystems/owfs/owfs/0001-Fix-compilation-with-GCC10.patch b/meta-filesystems/recipes-filesystems/owfs/owfs/0001-Fix-compilation-with-GCC10.patch
new file mode 100644
index 0000000000..6426ecb247
--- /dev/null
+++ b/meta-filesystems/recipes-filesystems/owfs/owfs/0001-Fix-compilation-with-GCC10.patch
@@ -0,0 +1,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
+
diff --git a/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb b/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb
index 414084449f..7f56c88fcc 100644
--- a/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb
+++ b/meta-filesystems/recipes-filesystems/owfs/owfs_3.2p3.bb
@@ -12,6 +12,7 @@ DEPENDS = "fuse virtual/libusb0"
SRCREV = "3744375dfaa350e31c9b360eb1e1a517bbeb5c47"
SRC_URI = "git://github.com/owfs/owfs \
file://0001-Add-build-rule-for-README.patch \
+ file://0001-Fix-compilation-with-GCC10.patch \
file://owhttpd \
file://owserver \
"