summarylogtreecommitdiffstats
path: root/postgresql-fix-libxml2-2.12.patch
diff options
context:
space:
mode:
authorJake Barnes2024-01-13 13:54:25 +1100
committerJake Barnes2024-01-13 13:54:25 +1100
commit0929e1f276ecb42fee27266542df0b80fbb28de1 (patch)
tree81079b754e2eecae133a40be5592ebd982bef71c /postgresql-fix-libxml2-2.12.patch
parent7587c2ff19c070262a79bccc577beefc5e4dbc50 (diff)
downloadaur-0929e1f276ecb42fee27266542df0b80fbb28de1.tar.gz
Add patch for libxml2 2.12
Diffstat (limited to 'postgresql-fix-libxml2-2.12.patch')
-rw-r--r--postgresql-fix-libxml2-2.12.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/postgresql-fix-libxml2-2.12.patch b/postgresql-fix-libxml2-2.12.patch
new file mode 100644
index 000000000000..3b3ed9b6d375
--- /dev/null
+++ b/postgresql-fix-libxml2-2.12.patch
@@ -0,0 +1,27 @@
+--- postgresql-12.17/src/backend/utils/adt/xml.c.orig 2023-11-06 23:11:55.000000000 +0100
++++ postgresql-12.17/src/backend/utils/adt/xml.c 2024-01-09 17:34:53.613808376 +0100
+@@ -119,7 +119,11 @@
+
+ static xmlParserInputPtr xmlPgEntityLoader(const char *URL, const char *ID,
+ xmlParserCtxtPtr ctxt);
++#if LIBXML_VERSION >= 21200
++static void xml_errorHandler(void *data, const xmlError *error);
++#else
+ static void xml_errorHandler(void *data, xmlErrorPtr error);
++#endif
+ static void xml_ereport_by_code(int level, int sqlcode,
+ const char *msg, int errcode);
+ static void chopStringInfoNewlines(StringInfo str);
+@@ -1751,8 +1755,12 @@
+ /*
+ * Error handler for libxml errors and warnings
+ */
++#if 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;