mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-30 22:11:59 -09:00
package/cegui: fix build with libxml2 >= 2.12
Fix the following build failure raised since bump of libxml2 to version 2.12.1 in commitd8ac52108c: /home/buildroot/autobuild/instance-1/output-1/build/cegui-00b4e1fe174da53b7ed726ab5970ba51bd5b5ee0/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp: In member function 'virtual void CEGUI::LibxmlParser::parseXML(CEGUI::XMLHandler&, const CEGUI::RawDataContainer&, const CEGUI::String&, bool)': /home/buildroot/autobuild/instance-1/output-1/build/cegui-00b4e1fe174da53b7ed726ab5970ba51bd5b5ee0/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp:111:40: error: invalid conversion from 'const xmlError*' {aka 'const _xmlError*'} to 'xmlError*' {aka '_xmlError*'} [-fpermissive] 111 | xmlError* err = xmlGetLastError(); | ~~~~~~~~~~~~~~~^~ | | | const xmlError* {aka const _xmlError*} Fixes:d8ac52108c- http://autobuild.buildroot.org/results/b239b7b03542311e311e4612e9b811c154302a6e Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
committed by
Yann E. MORIN
parent
f42004a046
commit
3b2bea40ab
@@ -0,0 +1,29 @@
|
|||||||
|
From 285ba5a2c0c435ed865c6e86afe314a822fd1e3f Mon Sep 17 00:00:00 2001
|
||||||
|
From: oreo639 <oreo6391@gmail.com>
|
||||||
|
Date: Sun, 18 Feb 2024 14:16:21 -0800
|
||||||
|
Subject: [PATCH] Fix return type of xmlGetLastError for libxml2 2.12
|
||||||
|
|
||||||
|
https://gitlab.gnome.org/GNOME/libxml2/-/commit/45470611b047db78106dcb2fdbd4164163c15ab7
|
||||||
|
|
||||||
|
Upstream: https://github.com/cegui/cegui/commit/285ba5a2c0c435ed865c6e86afe314a822fd1e3f
|
||||||
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||||
|
---
|
||||||
|
cegui/src/XMLParserModules/Libxml2/XMLParser.cpp | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
|
||||||
|
index 74a3dbddd..a408f9305 100644
|
||||||
|
--- a/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
|
||||||
|
+++ b/cegui/src/XMLParserModules/Libxml2/XMLParser.cpp
|
||||||
|
@@ -109,7 +109,11 @@ void LibxmlParser::parseXML(XMLHandler& handler,
|
||||||
|
|
||||||
|
if (!doc)
|
||||||
|
{
|
||||||
|
+#if LIBXML_VERSION >= 21200
|
||||||
|
+ const xmlError* err = xmlGetLastError();
|
||||||
|
+#else
|
||||||
|
xmlError* err = xmlGetLastError();
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
throw GenericException(
|
||||||
|
String("xmlParseMemory failed in file: '") +
|
||||||
Reference in New Issue
Block a user