[packages/postgresql/POSTGRESQL_16] fix warning when building with libxml2 >= 2.12
atler
atler at pld-linux.org
Fri Dec 22 03:47:15 CET 2023
commit e1d4be731c3844b519526e39ba626624aa71957c
Author: Jan Palus <atler at pld-linux.org>
Date: Fri Dec 22 01:34:50 2023 +0100
fix warning when building with libxml2 >= 2.12
libxml2-2.12.patch | 28 ++++++++++++++++++++++++++++
postgresql.spec | 4 ++--
2 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/postgresql.spec b/postgresql.spec
index 6b23135..825eaa3 100644
--- a/postgresql.spec
+++ b/postgresql.spec
@@ -50,7 +50,7 @@ Patch0: %{name}-conf.patch
Patch1: %{name}-absolute_dbpaths.patch
Patch2: %{name}-ecpg-includedir.patch
Patch3: ac.patch
-
+Patch4: libxml2-2.12.patch
Patch5: %{name}-heimdal.patch
Patch6: %{name}-link.patch
URL: https://www.postgresql.org/
@@ -803,7 +803,7 @@ Różne moduły dołączone do PostgreSQL-a.
%{?with_absolute_dbpaths:%patch1 -p1}
%patch2 -p1
%patch3 -p1
-
+%patch4 -p1
%patch5 -p1
%patch6 -p1
diff --git a/libxml2-2.12.patch b/libxml2-2.12.patch
new file mode 100644
index 0000000..6c45f20
--- /dev/null
+++ b/libxml2-2.12.patch
@@ -0,0 +1,28 @@
+--- postgresql-16.1/src/backend/utils/adt/xml.c.orig 2023-11-06 23:04:27.000000000 +0100
++++ postgresql-16.1/src/backend/utils/adt/xml.c 2023-12-22 01:16:10.408867469 +0100
+@@ -123,7 +123,11 @@
+ xmlParserCtxtPtr ctxt);
+ static void xml_errsave(Node *escontext, PgXmlErrorContext *errcxt,
+ int sqlcode, const char *msg);
++#if defined(LIBXML_VERSION) && LIBXML_VERSION >= 21200
++static void xml_errorHandler(void *data, const xmlError *error);
++#else
+ static void xml_errorHandler(void *data, xmlErrorPtr error);
++#endif
+ static int errdetail_for_xml_code(int code);
+ static void chopStringInfoNewlines(StringInfo str);
+ static void appendStringInfoLineSeparator(StringInfo str);
+@@ -2001,8 +2005,13 @@
+ /*
+ * Error handler for libxml errors and warnings
+ */
++#if defined(LIBXML_VERSION) && LIBXML_VERSION >= 21200
++static void
++xml_errorHandler(void *data, const xmlError *error)
++#else
+ static void
+ xml_errorHandler(void *data, xmlErrorPtr error)
++#endif
+ {
+ PgXmlErrorContext *xmlerrcxt = (PgXmlErrorContext *) data;
+ xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) error->ctxt;
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/postgresql.git/commitdiff/9f2ec955b90138031f812ed443ffb106a7b10ad6
More information about the pld-cvs-commit
mailing list