mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-16 06:07:00 +02:00
swiften: fix build for libxml2 2.12
This commit is contained in:
parent
8de145fae3
commit
62d7997fb3
1 changed files with 15 additions and 0 deletions
15
srcpkgs/swiften/patches/fix-libxml2-2.12.patch
Normal file
15
srcpkgs/swiften/patches/fix-libxml2-2.12.patch
Normal file
|
@ -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<int>(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;
|
Loading…
Add table
Reference in a new issue