[packages/libxml2] Fixes compat macro initGenericErrorDefaultFunc
arekm
arekm at pld-linux.org
Wed Aug 20 13:09:34 CEST 2025
commit df222dfefe83dd82d29919f1f63d53db0a270d87
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Aug 20 13:08:42 2025 +0200
Fixes compat macro initGenericErrorDefaultFunc
Fixes builds of other programs, that use libxml2, which failed with:
/usr/include/libxml2/libxml/xmlerror.h:23:45: error: invalid use of void expression
23 | xmlSetGenericErrorFunc(NULL, (h) ? *(h) : NULL)
| ^
initGenericErrorDefaultFunc.patch | 11 +++++++++++
libxml2.spec | 5 ++++-
2 files changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/libxml2.spec b/libxml2.spec
index 6a87b2c..2e04347 100644
--- a/libxml2.spec
+++ b/libxml2.spec
@@ -17,7 +17,7 @@ Summary(pl.UTF-8): Biblioteka libXML wersja 2
Summary(pt_BR.UTF-8): Biblioteca libXML versão 2
Name: libxml2
Version: 2.14.5
-Release: 1
+Release: 2
Epoch: 1
License: MIT
Group: Libraries
@@ -29,6 +29,7 @@ Patch1: %{name}-largefile.patch
Patch2: %{name}-libx32.patch
Patch3: %{name}-python-setup.patch
Patch4: %{name}-normalize.patch
+Patch5: initGenericErrorDefaultFunc.patch
# Fedora patches
# https://bugzilla.gnome.org/show_bug.cgi?id=789714
Patch11: %{name}-python3-unicode-errors.patch
@@ -185,6 +186,8 @@ do biblioteki libxml2.
%patch -P2 -p1
%patch -P3 -p1
%patch -P4 -p1
+%patch -P5 -p1
+
%patch -P11 -p1
%build
diff --git a/initGenericErrorDefaultFunc.patch b/initGenericErrorDefaultFunc.patch
new file mode 100644
index 0000000..91b866f
--- /dev/null
+++ b/initGenericErrorDefaultFunc.patch
@@ -0,0 +1,11 @@
+--- libxml2-2.14.5/include/libxml/xmlerror.h~ 2025-07-15 15:08:05.000000000 +0200
++++ libxml2-2.14.5/include/libxml/xmlerror.h 2025-08-20 13:04:41.913857953 +0200
+@@ -20,7 +20,7 @@ extern "C" {
+ * Backward compatibility
+ */
+ #define initGenericErrorDefaultFunc(h) \
+- xmlSetGenericErrorFunc(NULL, (h) ? *(h) : NULL)
++ xmlSetGenericErrorFunc(NULL, (h) ? *((xmlGenericErrorFunc *) (h)) : NULL)
+
+ /**
+ * xmlErrorLevel:
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libxml2.git/commitdiff/df222dfefe83dd82d29919f1f63d53db0a270d87
More information about the pld-cvs-commit
mailing list