16 lines
692 B
Diff
16 lines
692 B
Diff
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;
|