diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-11-27 08:02:59 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-11-27 16:09:13 +0100 |
commit | c8f7408db73d2f2ccacb25a2b4fef8dfebdfc6cb (patch) | |
tree | af8691a3b0697daf6d25b452610f4901acd5992e /unoxml/source/xpath/xpathapi.cxx | |
parent | 53de98b29548ded88e0a44c80256fc5e340d551e (diff) |
tdf#158302 fix build against system-libxml-2.12
Seen in a fedora:40 container, using --with-system-libcmis,
--with-system-liblangtag and --with-system-xmlsec.
Change-Id: I9d748d3dc0b70dbfdfcb6b99c9ce8440bda6f326
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159980
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'unoxml/source/xpath/xpathapi.cxx')
-rw-r--r-- | unoxml/source/xpath/xpathapi.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx index a60083983882..c2b753783176 100644 --- a/unoxml/source/xpath/xpathapi.cxx +++ b/unoxml/source/xpath/xpathapi.cxx @@ -26,6 +26,7 @@ #include <libxml/xmlerror.h> #include <libxml/xpath.h> #include <libxml/xpathInternals.h> +#include <libxml/xmlIO.h> #include <com/sun/star/xml/xpath/XPathException.hpp> @@ -217,7 +218,7 @@ namespace XPath return selectSingleNode(contextNode, expr); } - static OUString make_error_message(xmlErrorPtr pError) + static OUString make_error_message(const xmlError* pError) { OUStringBuffer buf; if (pError) { @@ -259,7 +260,11 @@ namespace XPath SAL_WARN("unoxml", "libxml2 error: " << str); } +#if LIBXML_VERSION >= 21200 + static void structured_error_func(void *, const xmlError* error) +#else static void structured_error_func(void *, xmlErrorPtr error) +#endif { SAL_WARN("unoxml", "libxml2 error: " << make_error_message(error)); } |