From ab6d5bebaf68a9f4d00440b2adbaffe0e5b2ae6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Simon=20Fauteux-Chapleau?= Date: Thu, 8 Aug 2024 10:55:08 -0400 Subject: [PATCH] qtwebengine: fix libxml2 build error Version 2.12 of libxml2 introduced a change that broke chromium's build, see: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/523633 --- .../third_party/blink/renderer/core/xml/xslt_processor.h | 5 +++++ .../blink/renderer/core/xml/xslt_processor_libxslt.cc | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h b/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h index d53835e9675..72536e4fd7d 100644 --- a/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h +++ b/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor.h @@ -77,7 +77,12 @@ class XSLTProcessor final : public ScriptWrappable { 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/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc b/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc index 133e0b3355d..e8e6a09f485 100644 --- a/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc +++ b/qtwebengine/src/3rdparty/chromium/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc @@ -66,7 +66,11 @@ void XSLTProcessor::GenericErrorFunc(void*, const char*, ...) { // 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(user_data); if (!console) return; -- 2.34.1