From 393f6907bf5697869d78cbf43ce341fd7b4bd057 Mon Sep 17 00:00:00 2001 From: Vitezslav Crhonek Date: Thu, 13 Feb 2020 07:54:20 +0100 Subject: [PATCH] Fix multiple definiton of variables (FTBFS with GCC 10) --- ...gather-2.2.9-fix-multiple-definition.patch | 25 +++++++++++++++++++ sblim-gather.spec | 9 ++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 sblim-gather-2.2.9-fix-multiple-definition.patch diff --git a/sblim-gather-2.2.9-fix-multiple-definition.patch b/sblim-gather-2.2.9-fix-multiple-definition.patch new file mode 100644 index 0000000..cdff4ef --- /dev/null +++ b/sblim-gather-2.2.9-fix-multiple-definition.patch @@ -0,0 +1,25 @@ +diff -up sblim-gather-2.2.9/plugin/metricVirt.h.orig sblim-gather-2.2.9/plugin/metricVirt.h +--- sblim-gather-2.2.9/plugin/metricVirt.h.orig 2014-10-09 23:29:10.000000000 +0200 ++++ sblim-gather-2.2.9/plugin/metricVirt.h 2020-02-12 13:52:56.161653863 +0100 +@@ -48,7 +48,9 @@ struct node_statistics_type { + size_t total_domains; + unsigned long long total_memory; + unsigned long long free_memory; +-} node_statistics; ++}; ++ ++extern struct node_statistics_type node_statistics; + + struct domain_statistics_type { + unsigned int domain_id[MAX_DOMAINS]; +@@ -61,7 +63,9 @@ struct domain_statistics_type { + unsigned long long cpu_used[MAX_DOMAINS]; + unsigned long long cpu_ready[MAX_DOMAINS]; + struct vdisk_type * blkio[MAX_DOMAINS]; +-} domain_statistics; ++}; ++ ++extern struct domain_statistics_type domain_statistics; + + int testHypervisor(int type); + diff --git a/sblim-gather.spec b/sblim-gather.spec index 10fc539..82fd28c 100644 --- a/sblim-gather.spec +++ b/sblim-gather.spec @@ -3,7 +3,7 @@ Name: sblim-gather Version: 2.2.9 -Release: 15%{?dist} +Release: 16%{?dist} Summary: SBLIM Gatherer License: EPL @@ -41,6 +41,8 @@ Patch6: sblim-gather-2.2.9-prov-reg-sfcb-systemd.patch Patch7: sblim-gather-2.2.9-remove-assoc-conflict.patch # Patch9: fix link fail with gcc-10 (patch by Jeff Law) Patch9: sblim-gather-2.2.9-inline.patch +# Patch10: fixes multiple definiton of variables (FTBFS with GCC 10) +Patch10: sblim-gather-2.2.9-fix-multiple-definition.patch Requires: cim-server Requires(post): systemd @@ -98,6 +100,7 @@ tar xfvz %{SOURCE4} %patch7 -p1 -b .remove-assoc-conflict %patch8 -p1 -b .remove-cxx-check %patch9 -p1 -b .inline +%patch10 -p1 -b .fix-multiple-definition %build %ifarch s390 s390x ppc ppc64 @@ -293,6 +296,10 @@ fi %ldconfig_postun provider %changelog +* Thu Feb 13 2020 Vitezslav Crhonek - 2.2.9-16 +- Fix multiple definiton of variables (FTBFS with GCC 10) + Resolves: #1800073 + * Thu Jan 30 2020 Fedora Release Engineering - 2.2.9-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild