Fix build with libxml2 2.12.0

Resolves: rhbz#2251888
This commit is contained in:
Yaakov Selkowitz 2023-11-27 11:50:39 -05:00 committed by Yaakov Selkowitz
parent 379b3a422b
commit f318097aba
2 changed files with 93 additions and 0 deletions

View File

@ -81,6 +81,9 @@ Patch5: patch-cyrus-rename-imtest
# Port to pcre2posix instead of the deprecated pcreposix # Port to pcre2posix instead of the deprecated pcreposix
# https://github.com/cyrusimap/cyrus-imapd/pull/4736 # https://github.com/cyrusimap/cyrus-imapd/pull/4736
Patch6: patch-cyrus-pcre2 Patch6: patch-cyrus-pcre2
# Fix build with libxml2 2.12.0
# https://github.com/cyrusimap/cyrus-imapd/pull/4745
Patch7: patch-cyrus-libxml212
BuildRequires: autoconf automake bison flex gcc gcc-c++ git glibc-langpack-en BuildRequires: autoconf automake bison flex gcc gcc-c++ git glibc-langpack-en
BuildRequires: groff libtool make pkgconfig rsync systemd transfig BuildRequires: groff libtool make pkgconfig rsync systemd transfig
@ -820,6 +823,7 @@ exclude+=("!Master.maxforkrate")
%changelog %changelog
* Thu Nov 16 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.8.1-3 * Thu Nov 16 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 3.8.1-3
- Use pcre2posix instead of the deprecated pcreposix (rhbz#2128286) - Use pcre2posix instead of the deprecated pcreposix (rhbz#2128286)
- Fix build with libxml2 2.12.0 (rhbz#2251888)
* Mon Oct 02 2023 Martin Osvald <mosvald@redhat.com> - 3.8.1-2 * Mon Oct 02 2023 Martin Osvald <mosvald@redhat.com> - 3.8.1-2
- SPDX migration - SPDX migration

89
patch-cyrus-libxml212 Normal file
View File

@ -0,0 +1,89 @@
From 37ceb82f0641b03d25d9a158423abbb270fe3867 Mon Sep 17 00:00:00 2001
From: David King <amigadave@amigadave.com>
Date: Mon, 27 Nov 2023 10:34:40 +0000
Subject: [PATCH] Add libxml/parser.h include
This is required for libxml2 2.12.0 and above.
---
imap/ctl_zoneinfo.c | 1 +
imap/http_dav.c | 1 +
imap/http_dav_sharing.c | 2 ++
imap/http_ischedule.c | 2 ++
imap/vcard_support.c | 1 +
imap/xcal.c | 1 +
6 files changed, 8 insertions(+)
diff --git a/imap/ctl_zoneinfo.c b/imap/ctl_zoneinfo.c
index 76e3cfdd17..f42cff3131 100644
--- a/imap/ctl_zoneinfo.c
+++ b/imap/ctl_zoneinfo.c
@@ -57,6 +57,7 @@
#include <sys/types.h>
#include <libical/ical.h>
+#include <libxml/parser.h>
#include <libxml/tree.h>
#include "annotate.h" /* for strlist functionality */
diff --git a/imap/http_dav.c b/imap/http_dav.c
index efa817a192..581b80e573 100644
--- a/imap/http_dav.c
+++ b/imap/http_dav.c
@@ -93,6 +93,7 @@
#include "imap/imap_err.h"
#include <errno.h>
+#include <libxml/parser.h>
#include <libxml/uri.h>
static const struct dav_namespace_t {
diff --git a/imap/http_dav_sharing.c b/imap/http_dav_sharing.c
index 5fff46eba4..26fe7f4e6a 100644
--- a/imap/http_dav_sharing.c
+++ b/imap/http_dav_sharing.c
@@ -59,6 +59,8 @@
#include "imap/http_err.h"
#include "imap/imap_err.h"
+#include <libxml/parser.h>
+
#define DAVNOTIFICATION_CONTENT_TYPE \
"application/davnotification+xml; charset=utf-8"
diff --git a/imap/http_ischedule.c b/imap/http_ischedule.c
index 24c30b48e1..9ac1b6fa7d 100644
--- a/imap/http_ischedule.c
+++ b/imap/http_ischedule.c
@@ -52,6 +52,8 @@
#include <libical/ical.h>
+#include <libxml/parser.h>
+
#include "global.h"
#include "httpd.h"
#include "http_caldav_sched.h"
diff --git a/imap/vcard_support.c b/imap/vcard_support.c
index aa9e15ac7e..f15824225e 100644
--- a/imap/vcard_support.c
+++ b/imap/vcard_support.c
@@ -42,6 +42,7 @@
*/
#include <config.h>
+#include <libxml/parser.h>
#include <libxml/tree.h>
#include "vcard_support.h"
diff --git a/imap/xcal.c b/imap/xcal.c
index 1f43d75488..cc749ab439 100644
--- a/imap/xcal.c
+++ b/imap/xcal.c
@@ -47,6 +47,7 @@
#include <stddef.h> /* for offsetof() macro */
#include <syslog.h>
+#include <libxml/parser.h>
#include <libxml/tree.h>
#include "httpd.h"