qt5-webengine: fix build for libxml2 2.12

This commit is contained in:
oreo639 2024-02-19 06:07:22 -08:00 committed by oreo639
parent f0e64f2a0d
commit 873ce835a8
1 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,34 @@
Based on: https://github.com/chromium/chromium/commit/871f8ae9b65ce2679b0bc0be36902d65edf0c1e4
diff --git a/third_party/blink/renderer/core/xml/xslt_processor.h b/third_party/blink/renderer/core/xml/xslt_processor.h
index d53835e9675793e..2eaea31ed29b90f 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
+++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h
@@ -79,7 +79,11 @@ class XSLTProcessor final : public Scrip
void reset();
+#if LIBXML_VERSION >= 21200
+ static void ParseErrorFunc(void* user_data, const xmlError*);
+#else
static void ParseErrorFunc(void* user_data, xmlError*);
+#endif
static void GenericErrorFunc(void* user_data, const char* msg, ...);
// Only for libXSLT callbacks
diff --git a/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
index 133e0b3355d2f09..f424077089da87d 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
@@ -60,7 +60,11 @@ void XSLTProcessor::GenericErrorFunc(voi
// It would be nice to do something with this error message.
}
+#if LIBXML_VERSION >= 21200
+void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
+#else
void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
+#endif
FrameConsole* console = static_cast<FrameConsole*>(user_data);
if (!console)
return;