From ce9b22198e9e303af2aca77729a9e7805cfe6068 Mon Sep 17 00:00:00 2001 From: Vitezslav Crhonek Date: Wed, 12 Feb 2020 14:44:29 +0100 Subject: [PATCH] Fixes multiple definiton of variables (FTBFS with GCC 10) --- ...m-sfcb-1.4.9-fix-multiple-definition.patch | 71 +++++++++++++++++++ sblim-sfcb.spec | 9 ++- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 sblim-sfcb-1.4.9-fix-multiple-definition.patch diff --git a/sblim-sfcb-1.4.9-fix-multiple-definition.patch b/sblim-sfcb-1.4.9-fix-multiple-definition.patch new file mode 100644 index 0000000..db9e1fb --- /dev/null +++ b/sblim-sfcb-1.4.9-fix-multiple-definition.patch @@ -0,0 +1,71 @@ +diff -up sblim-sfcb-1.4.9/control.h.orig sblim-sfcb-1.4.9/control.h +--- sblim-sfcb-1.4.9/control.h.orig 2014-11-25 02:43:10.000000000 +0100 ++++ sblim-sfcb-1.4.9/control.h 2020-02-12 12:14:46.078102974 +0100 +@@ -28,7 +28,7 @@ int getControlUNum(char *id, + int getControlULong(char *id, unsigned long *val); + int getControlNum(char *id, long *val); + int getControlBool(char *id, int *val); +-const char * sfcBrokerStart; ++extern const char * sfcBrokerStart; + + #endif + /* MODELINES */ +diff -up sblim-sfcb-1.4.9/providerMgr.c.orig sblim-sfcb-1.4.9/providerMgr.c +--- sblim-sfcb-1.4.9/providerMgr.c.orig 2020-02-12 12:14:46.065102946 +0100 ++++ sblim-sfcb-1.4.9/providerMgr.c 2020-02-12 12:19:15.879677891 +0100 +@@ -53,6 +53,8 @@ + #define SFCB_ASM(x) + #endif + ++sigset_t mask, old_mask; ++ + static pthread_mutex_t resultsocketMutex = PTHREAD_MUTEX_INITIALIZER; + + extern CMPIBroker *Broker; +diff -up sblim-sfcb-1.4.9/providerMgr.h.orig sblim-sfcb-1.4.9/providerMgr.h +--- sblim-sfcb-1.4.9/providerMgr.h.orig 2014-11-25 02:43:12.000000000 +0100 ++++ sblim-sfcb-1.4.9/providerMgr.h 2020-02-12 12:14:46.078102974 +0100 +@@ -398,7 +398,7 @@ BinResponseHdr **invokeProviders(BinRequ + BinResponseHdr *invokeProvider(BinRequestContext * ctx); + void freeResponseHeaders(BinResponseHdr ** resp, + BinRequestContext * ctx); +-sigset_t mask, old_mask; ++extern sigset_t mask, old_mask; + + #endif + /* MODELINES */ +diff -up sblim-sfcb-1.4.9/sfcBroker.c.orig sblim-sfcb-1.4.9/sfcBroker.c +--- sblim-sfcb-1.4.9/sfcBroker.c.orig 2014-11-25 02:43:13.000000000 +0100 ++++ sblim-sfcb-1.4.9/sfcBroker.c 2020-02-12 12:22:21.768073986 +0100 +@@ -52,6 +52,8 @@ + #include "config.h" + #endif + ++const char *sfcBrokerStart; ++ + int sfcBrokerPid = 0; + + extern int sfcbUseSyslog; +diff -up sblim-sfcb-1.4.9/trace.c.orig sblim-sfcb-1.4.9/trace.c +--- sblim-sfcb-1.4.9/trace.c.orig 2014-11-25 02:43:17.000000000 +0100 ++++ sblim-sfcb-1.4.9/trace.c 2020-02-12 12:15:19.319173804 +0100 +@@ -48,6 +48,7 @@ + * --------------------------------------------------------------------------- + */ + ++int colorTrace; + char *processName = NULL; + int providerProcess = 0; + int idleThreadId = 0; +diff -up sblim-sfcb-1.4.9/trace.h.orig sblim-sfcb-1.4.9/trace.h +--- sblim-sfcb-1.4.9/trace.h.orig 2014-11-25 02:43:17.000000000 +0100 ++++ sblim-sfcb-1.4.9/trace.h 2020-02-12 12:14:46.078102974 +0100 +@@ -130,7 +130,7 @@ typedef struct traceId { + #define CYAN 6 + #define WHITE 7 + void changeTextColor(int reset); +-int colorTrace; ++extern int colorTrace; + + #define MAX_MSG_SIZE 1024 /* max length of trace message */ + diff --git a/sblim-sfcb.spec b/sblim-sfcb.spec index ce208ae..595091e 100644 --- a/sblim-sfcb.spec +++ b/sblim-sfcb.spec @@ -8,7 +8,7 @@ Name: sblim-sfcb Summary: Small Footprint CIM Broker URL: http://sblim.wiki.sourceforge.net/ Version: 1.4.9 -Release: 17%{?dist} +Release: 18%{?dist} License: EPL-1.0 Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 Source1: sfcb.service @@ -41,6 +41,8 @@ Patch9: sblim-sfcb-1.4.9-fix-ppc-optimization-level.patch # Patch10: fixes docdir name and removes install of COPYING with license # which is included through %%license Patch10: sblim-sfcb-1.4.9-docdir-license.patch +# Patch11: fixes multiple definiton of variables (FTBFS with GCC 10) +Patch11: sblim-sfcb-1.4.9-fix-multiple-definition.patch Provides: cim-server = 0 Requires: cim-schema Requires: sblim-sfcCommon @@ -81,6 +83,7 @@ Programming Interface (CMPI). %patch8 -p1 -b .fix-null-content-type-crash %patch9 -p1 -b .fix-ppc-optimization-level %patch10 -p1 -b .docdir-license +%patch11 -p1 -b .fix-multiple-definition %build %configure --enable-debug --enable-uds --enable-ssl --enable-pam --enable-ipv6 \ @@ -139,6 +142,10 @@ fi; %files -f _pkg_list %changelog +* Wed Feb 12 2020 Vitezslav Crhonek - 1.4.9-18 +- Fixes multiple definiton of variables (FTBFS with GCC 10) + Resolves: #1800074 + * Thu Jan 30 2020 Fedora Release Engineering - 1.4.9-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild