From bb2af23b2a17b67091e1316f6bb53ba9bcf31af9 Mon Sep 17 00:00:00 2001 From: wenyuzifang Date: Mon, 17 Nov 2025 22:08:14 +0800 Subject: [PATCH] Update code from upstream --- c89.patch | 31 +++++++++++++++++++++++++++++++ sblim-sfcc.spec | 9 ++++++--- 2 files changed, 37 insertions(+), 3 deletions(-) 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 931f190..4e7f54b 100644 --- a/sblim-sfcc.spec +++ b/sblim-sfcc.spec @@ -1,16 +1,17 @@ -%define anolis_release 1 +%define anolis_release 2 Summary: Small Footprint CIM Client Library Name: sblim-sfcc -Version: 2.2.8 +Version: 2.2.8 Release: %{anolis_release}%{?dist} License: EPL-1.0 URL: http://www.sblim.org -Source0: http://downloads.sourceforge.net/project/sblim/%{name}/%{name}-%{version}.tar.bz2 +Source0: http://downloads.sourceforge.net/project/sblim/sblim-sfcc/sblim-sfcc-2.2.8.tar.bz2 # Patch0: fixes docdir name and removes install of COPYING with license # 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++ @@ -69,5 +70,7 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libcmpisfcc.so.1.0.0 %doc AUTHORS ChangeLog INSTALL README NEWS %changelog +* Mon Nov 17 2025 wenyuzifang - 2.2.8-2 +- Apply this patch to ensure C89 compliance and fix compilation errors with GCC 14. * Sat Mar 25 2023 Chunmei Xu - 2.2.8-1 - init from upstream -- Gitee