diff options
author | Alexander Golubev <fatzer2@gmail.com> | 2025-07-28 22:51:51 +0300 |
---|---|---|
committer | Alexander Golubev <fatzer2@gmail.com> | 2025-07-28 22:51:51 +0300 |
commit | 8870815cc64f172228322891053943d7ab8557bb (patch) | |
tree | 875b0972a01262024f57db009bbc0188108cde0c | |
parent | 9962acf6ebbadb0004435509e3b6002475d31d08 (diff) | |
download | koffice-8870815cc64f172228322891053943d7ab8557bb.tar.gz koffice-8870815cc64f172228322891053943d7ab8557bb.zip |
filters/xsltfilter: fix FTBFS against libxml 2.13+
See: https://gitlab.gnome.org/GNOME/libxml2/-/commit/c011e7605d42030cf21acdece466aaddaeb5a360
Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/koffice/issues/96
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
-rw-r--r-- | filters/xsltfilter/export/xsltproc.cpp | 4 | ||||
-rw-r--r-- | filters/xsltfilter/import/xsltproc.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/filters/xsltfilter/export/xsltproc.cpp b/filters/xsltfilter/export/xsltproc.cpp index 3bd20408a..d252cdcd6 100644 --- a/filters/xsltfilter/export/xsltproc.cpp +++ b/filters/xsltfilter/export/xsltproc.cpp @@ -287,7 +287,11 @@ int XSLTProc::parse() * disable CDATA from being built in the document tree */ xmlDefaultSAXHandlerInit(); +#if LIBXML_VERSION < 21300 + // In 2.13.0 this global variable was made constant and claimed that + // it "hasn't had an effect for a long time" xmlDefaultSAXHandler.cdataBlock = NULL; +#endif // LIBXML_VERSION if ((cur != NULL) && (cur->errors == 0)) { diff --git a/filters/xsltfilter/import/xsltproc.cpp b/filters/xsltfilter/import/xsltproc.cpp index 3bd20408a..d252cdcd6 100644 --- a/filters/xsltfilter/import/xsltproc.cpp +++ b/filters/xsltfilter/import/xsltproc.cpp @@ -287,7 +287,11 @@ int XSLTProc::parse() * disable CDATA from being built in the document tree */ xmlDefaultSAXHandlerInit(); +#if LIBXML_VERSION < 21300 + // In 2.13.0 this global variable was made constant and claimed that + // it "hasn't had an effect for a long time" xmlDefaultSAXHandler.cdataBlock = NULL; +#endif // LIBXML_VERSION if ((cur != NULL) && (cur->errors == 0)) { |