libmusicbrainz5: fix build with libxml2 2.12

This commit is contained in:
wiz 2024-02-01 08:50:01 +00:00
parent 3a4450d06d
commit ac9afb43cc
2 changed files with 36 additions and 1 deletions

View File

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.5 2021/10/26 09:59:08 nia Exp $
$NetBSD: distinfo,v 1.6 2024/02/01 08:50:01 wiz Exp $
BLAKE2s (libmusicbrainz-5.1.0.tar.gz) = 519cc6e0329d06bbc2648c574f26fd8faa4ed8a378b7cf24d54a527354c288c6
SHA512 (libmusicbrainz-5.1.0.tar.gz) = daa7ccb94e517e90f7d88a0659c84b00f04c6a73ef7771b7e3bd9101fa6569b1935a68a3689502ed0cc8c0d71ba9d2d0ebd9c074dd5eed9f75a3db390b222e03
Size (libmusicbrainz-5.1.0.tar.gz) = 77220 bytes
SHA1 (patch-src_xmlParser.cc) = 19bd9504e451e09d81b740802ac4b36c9ed6c20a

View File

@ -0,0 +1,34 @@
$NetBSD: patch-src_xmlParser.cc,v 1.1 2024/02/01 08:50:01 wiz Exp $
Fix build with libxml2 2.12.
https://github.com/metabrainz/libmusicbrainz/commit/9ba00067a15479a52262a5126bcb6889da5884b7
https://github.com/metabrainz/libmusicbrainz/commit/558c9ba0e6d702d5c877f75be98176f57abf1b02
--- src/xmlParser.cc.orig 2024-02-01 08:48:39.967034933 +0000
+++ src/xmlParser.cc
@@ -30,6 +30,7 @@
#include <cstring>
#include <libxml/tree.h>
+#include <libxml/parser.h>
XMLResults::XMLResults()
: line(0),
@@ -56,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const st
doc = xmlParseFile(filename.c_str());
if ((doc == NULL) && (results != NULL)) {
- xmlErrorPtr error = xmlGetLastError();
+ const xmlError * error = xmlGetLastError();
results->message = error->message;
results->line = error->line;
results->code = error->code;
@@ -71,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const
doc = xmlParseMemory(xml.c_str(), xml.length());
if ((doc == NULL) && (results != NULL)) {
- xmlErrorPtr error = xmlGetLastError();
+ const xmlError * error = xmlGetLastError();
results->message = error->message;
results->line = error->line;
results->code = error->code;