From c410dd827bbbd2fb12ad1428f86a89f1bded07a4 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 1 Feb 2024 08:47:10 +0100 Subject: [PATCH] Add pointer casts for GCC 14/C89 compatibility Related to: --- c89.patch | 31 +++++++++++++++++++++++++++++++ sblim-sfcc.spec | 7 ++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 c89.patch diff --git a/c89.patch b/c89.patch new file mode 100644 index 0000000..25fc177 --- /dev/null +++ b/c89.patch @@ -0,0 +1,31 @@ +Add casts required for C89 compatibility. This addresses a build +failure with GCC 14. + +Submitted upstream: + +diff --git a/TEST/v2test_ec.c b/TEST/v2test_ec.c +index 940ca57638ceec79..042a9a0c4d5a7abf 100644 +--- a/TEST/v2test_ec.c ++++ b/TEST/v2test_ec.c +@@ -83,7 +83,7 @@ int main() + count = enm->ft->hasNext(enm, NULL) ; + while (count > 0) { + data = enm->ft->getNext(enm, NULL); +- showClass(data.value.cls); ++ showClass((CMPIConstClass *) data.value.cls); + /* + * see if we have any more + */ +diff --git a/TEST/v2test_ein.c b/TEST/v2test_ein.c +index ede95c18a5b48ff8..712c204bd3aac357 100644 +--- a/TEST/v2test_ein.c ++++ b/TEST/v2test_ein.c +@@ -93,7 +93,7 @@ int count = 0; + + data = enm->ft->getNext(enm, NULL); + +- showObjectPath(data.value.ref); ++ showObjectPath((CMPIObjectPath *) data.value.ref); + /* + * see if we have any more + */ diff --git a/sblim-sfcc.spec b/sblim-sfcc.spec index 4debea4..34780de 100644 --- a/sblim-sfcc.spec +++ b/sblim-sfcc.spec @@ -7,7 +7,7 @@ Summary: Small Footprint CIM Client Library Name: sblim-sfcc Version: 2.2.8 -Release: 24%{?dist} +Release: 25%{?dist} License: EPL-1.0 URL: http://www.sblim.org Source0: http://downloads.sourceforge.net/project/sblim/%{name}/%{name}-%{version}.tar.bz2 @@ -15,6 +15,7 @@ Source0: http://downloads.sourceforge.net/project/sblim/%{name}/%{name}-%{versio # which is included through %%license Patch0: sblim-sfcc-2.2.8-docdir-license.patch Patch1: c99.patch +Patch2: c89.patch BuildRequires: make BuildRequires: curl-devel chrpath BuildRequires: gcc gcc-c++ @@ -35,6 +36,7 @@ Small Footprint CIM Client Library Header Files and Link Libraries %setup -q %patch0 -p1 -b .docdir-license %patch1 -p1 -b .c99 +%patch -P 2 -p1 %build chmod a-x backend/cimxml/*.[ch] @@ -66,6 +68,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libcmpisfcc.so.1.0.0 %{_libdir}/libcmpisfcc.so %changelog +* Thu Feb 01 2024 Florian Weimer - 2.2.8-25 +- Add pointer casts for GCC 14/C89 compatibility + * Sat Jan 27 2024 Fedora Release Engineering - 2.2.8-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild