From 3d476b7c77a27fee1f9cc335ac011346964b744d Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 19 Dec 2023 08:22:58 -0500 Subject: [PATCH] Fix build with libxml2 2.12 https://github.com/abrt/libreport/pull/801 --- 801.patch | 42 ++++++++++++++++++++++++++++++++++++++++++ libreport.spec | 5 ++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 801.patch diff --git a/801.patch b/801.patch new file mode 100644 index 0000000..8f784ff --- /dev/null +++ b/801.patch @@ -0,0 +1,42 @@ +From 9be0010e109d307921a049d10078813423227582 Mon Sep 17 00:00:00 2001 +From: Nicolas Iooss +Date: Fri, 15 Dec 2023 18:03:33 +0100 +Subject: [PATCH] Fix compatibility with libxml2 2.12 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Since libxml2 2.12, xmlNodePtr is no longer included by libxml/encoding.h. +This leads to build errors such as: + + CC reporter_mantisbt-reporter-mantisbt.o + In file included from reporter-mantisbt.c:22: + mantisbt.h:48:5: error: unknown type name ‘xmlNodePtr’ + 48 | xmlNodePtr sr_root; + | ^~~~~~~~~~ + mantisbt.h:49:5: error: unknown type name ‘xmlNodePtr’ + 49 | xmlNodePtr sr_body; + | ^~~~~~~~~~ + mantisbt.h:50:5: error: unknown type name ‘xmlNodePtr’ + 50 | xmlNodePtr sr_method; + | ^~~~~~~~~~ + +Fix this by including libxml/tree.h. + +Signed-off-by: Nicolas Iooss +--- + src/plugins/mantisbt.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/plugins/mantisbt.h b/src/plugins/mantisbt.h +index 1feaf8f88..6979e7244 100644 +--- a/src/plugins/mantisbt.h ++++ b/src/plugins/mantisbt.h +@@ -25,6 +25,7 @@ extern "C" { + #endif + + #include ++#include + #include "problem_report.h" + + #define SOAP_STRING "ns2:string" diff --git a/libreport.spec b/libreport.spec index d6dcdba..972a6f6 100644 --- a/libreport.spec +++ b/libreport.spec @@ -19,6 +19,9 @@ Release: 3%{?dist} License: GPL-2.0-or-later URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +# Fix compatibility with libxml2 2.12 +Patch: https://github.com/abrt/%{name}/pull/801.patch + BuildRequires: %{dbus_devel} BuildRequires: gtk3-devel BuildRequires: curl-devel @@ -286,7 +289,7 @@ data over ftp/scp... %endif %prep -%autosetup +%autosetup -p1 %build ./autogen.sh