summaryrefslogtreecommitdiff
path: root/media-libs/musicbrainz/files/musicbrainz-5.1.0-libxml2-2.12.patch
blob: 41956918bb935794983e5579113326395822e1f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
https://bugs.gentoo.org/923011
https://github.com/metabrainz/libmusicbrainz/commit/9ba00067a15479a52262a5126bcb6889da5884b7
https://github.com/metabrainz/libmusicbrainz/commit/558c9ba0e6d702d5c877f75be98176f57abf1b02

From 9ba00067a15479a52262a5126bcb6889da5884b7 Mon Sep 17 00:00:00 2001
From: Christopher Degawa <ccom@randomderp.com>
Date: Sun, 8 Oct 2023 11:41:30 -0500
Subject: [PATCH] libxml: include parser.h

libxml2 removed the inclusion of global.h in a few of its include files,
so we can no longer rely on transitive includes.

This applies to functions like xmlParseFile.

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
---
 src/xmlParser.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/xmlParser.cc b/src/xmlParser.cc
index e63df55..53dec25 100644
--- a/src/xmlParser.cc
+++ b/src/xmlParser.cc
@@ -30,6 +30,7 @@
 
 #include <cstring>
 #include <libxml/tree.h>
+#include <libxml/parser.h>
 
 XMLResults::XMLResults()
     : line(0),


From 558c9ba0e6d702d5c877f75be98176f57abf1b02 Mon Sep 17 00:00:00 2001
From: Christopher Degawa <ccom@randomderp.com>
Date: Sun, 8 Oct 2023 11:42:55 -0500
Subject: [PATCH] libxml: constify the storage of xmlGetLastError()

libxml2 recently made it a const return.
Since nothing is being modified of it, this should have no real effect
past satisfying the compiler.

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
---
 src/xmlParser.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xmlParser.cc b/src/xmlParser.cc
index 53dec25..fee684c 100644
--- a/src/xmlParser.cc
+++ b/src/xmlParser.cc
@@ -57,7 +57,7 @@ XMLNode *XMLRootNode::parseFile(const std::string &filename, XMLResults* results
 
     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;
@@ -72,7 +72,7 @@ XMLNode *XMLRootNode::parseString(const std::string &xml, XMLResults* results)
 
     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;