From 62d7997fb3031346327873061ee21535c72f4cf8 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Mon, 19 Feb 2024 05:43:29 -0800 Subject: [PATCH] swiften: fix build for libxml2 2.12 --- srcpkgs/swiften/patches/fix-libxml2-2.12.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 srcpkgs/swiften/patches/fix-libxml2-2.12.patch diff --git a/srcpkgs/swiften/patches/fix-libxml2-2.12.patch b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch new file mode 100644 index 00000000000..3e3e4d16352 --- /dev/null +++ b/srcpkgs/swiften/patches/fix-libxml2-2.12.patch @@ -0,0 +1,15 @@ +diff -rup Swiften/Parser/LibXMLParser.cpp.orig Swiften/Parser/LibXMLParser.cpp +--- a/Swiften/Parser/LibXMLParser.cpp ++++ b/Swiften/Parser/LibXMLParser.cpp +@@ -97,7 +97,11 @@ bool LibXMLParser::parse(const std::stri + if (xmlParseChunk(p->context_, data.c_str(), boost::numeric_cast(data.size()), false) == XML_ERR_OK) { + return true; + } ++#if LIBXML_VERSION >= 21200 ++ const xmlError* error = xmlCtxtGetLastError(p->context_); ++#else + xmlError* error = xmlCtxtGetLastError(p->context_); ++#endif + if (error->code == XML_WAR_NS_URI || error->code == XML_WAR_NS_URI_RELATIVE) { + xmlCtxtResetLastError(p->context_); + p->context_->errNo = XML_ERR_OK;