diff --git a/c89.patch b/c89.patch
new file mode 100644
index 0000000000000000000000000000000000000000..25fc17756dd349ffaf3c955d8733143bfffc76ea
--- /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 931f190059852182319b110a2e595ba0d1967147..4e7f54bd4dbd9562f0eac2912a49c3fd008eefd3 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