[packages/domoticz] upstream fix for build failure with gcc 12
atler
atler at pld-linux.org
Thu Nov 3 13:12:11 CET 2022
commit badbcd9b25bfb0bbe2de63150ae19c683613141a
Author: Jan Palus <atler at pld-linux.org>
Date: Thu Nov 3 13:11:37 2022 +0100
upstream fix for build failure with gcc 12
domoticz.spec | 2 ++
gcc12.patch | 31 +++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
---
diff --git a/domoticz.spec b/domoticz.spec
index 6bf42f6..185effc 100644
--- a/domoticz.spec
+++ b/domoticz.spec
@@ -17,6 +17,7 @@ Patch2: no-git.patch
Patch3: %{name}-no_updates.patch
Patch4: strstr.patch
Patch5: config.patch
+Patch6: gcc12.patch
BuildRequires: boost-devel >= 1.66.0
BuildRequires: cereal-devel
BuildRequires: cmake >= 3.16.0
@@ -64,6 +65,7 @@ and much more. Notifications/Alerts can be sent to any mobile device
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
APPVERSION="%{version}"
echo "#define APPVERSION ${APPVERSION##*.}" > appversion.h
diff --git a/gcc12.patch b/gcc12.patch
new file mode 100644
index 0000000..6f7dc14
--- /dev/null
+++ b/gcc12.patch
@@ -0,0 +1,31 @@
+From 2975b1113d9540f39b6bade3b6d459b61c2e5007 Mon Sep 17 00:00:00 2001
+From: Arjen de Korte <build+github at de-korte.org>
+Date: Sun, 15 May 2022 19:00:02 +0200
+Subject: [PATCH] Fix compilation with GCC12
+
+Building domoticz fails under GCC12 with the following error:
+
+In file included from /usr/include/c++/12/utility:68,
+ from /home/abuild/rpmbuild/BUILD/domoticz-2022.1/main/LuaTable.cpp:10:
+/usr/include/c++/12/bits/stl_relops.h:86:5: error: template with C linkage
+ 86 | template <class _Tp>
+ | ^~~~~~~~
+---
+ main/LuaTable.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/main/LuaTable.cpp b/main/LuaTable.cpp
+index 6475fac6bd..eca7489a42 100644
+--- a/main/LuaTable.cpp
++++ b/main/LuaTable.cpp
+@@ -6,9 +6,9 @@ extern "C" {
+ #include <lua.h>
+ #include <lualib.h>
+ #include <lauxlib.h>
++}
+
+ #include <utility>
+-}
+
+ CLuaTable::CLuaTable(lua_State *lua_state, const std::string &Name)
+ {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/domoticz.git/commitdiff/badbcd9b25bfb0bbe2de63150ae19c683613141a
More information about the pld-cvs-commit
mailing list