Fix build for libxml2 2.12.1

This commit is contained in:
Richard W.M. Jones 2023-11-27 14:34:15 +00:00
parent 0d42c50ccc
commit ab2d1d568e
2 changed files with 33 additions and 2 deletions

View File

@ -0,0 +1,26 @@
From 02c39dc5e8109ddb911d90759883a504008ba509 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 27 Nov 2023 14:04:33 +0000
Subject: [PATCH] lib: Include <libxml/parser.h> for xmlReadMemory
Since libxml2 2.12.1 including this header is required to have this
function declared.
---
lib/launch-libvirt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c
index 994909a35f..872bc2a054 100644
--- a/lib/launch-libvirt.c
+++ b/lib/launch-libvirt.c
@@ -38,6 +38,7 @@
#include <libvirt/virterror.h>
#endif
+#include <libxml/parser.h>
#include <libxml/xmlwriter.h>
#include <libxml/xpath.h>
--
2.42.0

View File

@ -31,7 +31,7 @@ ExcludeArch: %{ix86}
# If there are patches which touch autotools files, set this to 1.
%if !0%{?rhel}
%global patches_touch_autotools 1
%global patches_touch_autotools %{nil}
%else
# On RHEL the downstream patches always touch autotools files.
%global patches_touch_autotools 1
@ -50,7 +50,7 @@ Summary: Access and modify virtual machine disk images
Name: libguestfs
Epoch: 1
Version: 1.51.8
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPL-2.1-or-later
# Build only for architectures that have a kernel
@ -84,6 +84,8 @@ Source7: libguestfs.keyring
# Maintainer script which helps with handling patches.
Source8: copy-patches.sh
Patch: 0001-lib-Include-libxml-parser.h-for-xmlReadMemory.patch
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool, gettext-devel
%endif
@ -1094,6 +1096,9 @@ rm ocaml/html/.gitignore
%changelog
* Mon Nov 27 2023 Richard W.M. Jones <rjones@redhat.com> - 1:1.51.8-2
- Fix build for libxml2 2.12.1
* Thu Nov 16 2023 Richard W.M. Jones <rjones@redhat.com> - 1:1.51.8-1
- New upstream development version 1.51.8