diff mbox series

[meta-oe] libosinfo: Fix build with libxml2 v2.12

Message ID 20240307192447.1772513-1-raj.khem@gmail.com
State Accepted, archived
Headers show
Series [meta-oe] libosinfo: Fix build with libxml2 v2.12 | expand

Commit Message

Khem Raj March 7, 2024, 7:24 p.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Alexander Kanavin <alex@linutronix.de>
---
 ...rror-struct-constant-in-propagate_li.patch | 32 +++++++++++++++++++
 .../libosinfo/libosinfo_1.11.0.bb             |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta-oe/recipes-support/libosinfo/libosinfo/0001-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/libosinfo/libosinfo/0001-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch b/meta-oe/recipes-support/libosinfo/libosinfo/0001-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch
new file mode 100644
index 0000000000..467c6b4baf
--- /dev/null
+++ b/meta-oe/recipes-support/libosinfo/libosinfo/0001-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch
@@ -0,0 +1,32 @@ 
+From 5bbdd06503456784c5ffa22409e8bab50470d673 Mon Sep 17 00:00:00 2001
+From: Michal Privoznik <mprivozn@redhat.com>
+Date: Mon, 27 Nov 2023 15:11:45 +0100
+Subject: [PATCH] osinfo: Make xmlError struct constant in
+ propagate_libxml_error()
+
+In libxml2 commit v2.12.0~14 the API changed so that
+xmlGetLastError() returns pointer to a constant xmlError struct.
+Reflect this change in our code.
+
+Upstream-Status: Backport [https://gitlab.com/libosinfo/libosinfo/-/merge_requests/155]
+Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
+---
+ osinfo/osinfo_install_script.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/osinfo/osinfo_install_script.c b/osinfo/osinfo_install_script.c
+index 5800f37..303245a 100644
+--- a/osinfo/osinfo_install_script.c
++++ b/osinfo/osinfo_install_script.c
+@@ -769,7 +769,7 @@ static void propagate_libxml_error(GError **error, const char *format, ...) G_GN
+ 
+ static void propagate_libxml_error(GError **error, const char *format, ...)
+ {
+-    xmlErrorPtr err = xmlGetLastError();
++    const xmlError *err = xmlGetLastError();
+     char *prefix;
+     va_list ap;
+ 
+-- 
+2.44.0
+
diff --git a/meta-oe/recipes-support/libosinfo/libosinfo_1.11.0.bb b/meta-oe/recipes-support/libosinfo/libosinfo_1.11.0.bb
index 68d917ffe9..8ef7ac3df0 100644
--- a/meta-oe/recipes-support/libosinfo/libosinfo_1.11.0.bb
+++ b/meta-oe/recipes-support/libosinfo/libosinfo_1.11.0.bb
@@ -8,6 +8,7 @@  LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
 SRC_URI = " \
 	git://gitlab.com/libosinfo/libosinfo.git;branch=main;protocol=https \
 	file://0001-meson.build-allow-crosscompiling-gir.patch \
+	file://0001-osinfo-Make-xmlError-struct-constant-in-propagate_li.patch \
 "
 
 SRCREV = "ca9dd5b810dc04ea38048ae9be491654c8596ef9"