diff options
author | Fedja Beader <fedja@protonmail.ch> | 2025-06-05 16:51:38 +0000 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2025-06-05 16:51:38 +0000 |
commit | b727a394d19f79363af296d5ff773cda36a2056e (patch) | |
tree | 171050abfbfac4edd6eb566b49ec65b409aac960 /src/utils/dumplibs.cpp | |
parent | 888d40c9182df69129547e3381ce6f10ee0d5661 (diff) | |
download | manaplus-b727a394d19f79363af296d5ff773cda36a2056e.tar.gz manaplus-b727a394d19f79363af296d5ff773cda36a2056e.tar.bz2 manaplus-b727a394d19f79363af296d5ff773cda36a2056e.tar.xz manaplus-b727a394d19f79363af296d5ff773cda36a2056e.zip |
fix missing __xmlParserVersion() compat in newer libxml2, spotted by bakai
libxml2 deprecated __xmlParserVersion() and added a pointer to constant string version in commit
2023-09-20 "globals: Don't store xmlParserVersion in global state"
and added a compat function with it. This commit was made before v2.12.0 was released. Thus, any version *past* unreleased v2.12.0 is guaranteed to have the new API.
The compat function was removed at some point later, causing a compile failure.
****
mana/plus!190
Diffstat (limited to 'src/utils/dumplibs.cpp')
-rw-r--r-- | src/utils/dumplibs.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/utils/dumplibs.cpp b/src/utils/dumplibs.cpp index 66fe62798..7efa3704a 100644 --- a/src/utils/dumplibs.cpp +++ b/src/utils/dumplibs.cpp @@ -140,7 +140,13 @@ void dumpLibs() LIBXML_TEST_VERSION #endif // LIBXML_TEST_VERSION #ifdef ENABLE_LIBXML - const char *const *xmlVersion = __xmlParserVersion(); + const char *const *xmlVersion +#if LIBXML_VERSION > 21200 + = &xmlParserVersion; +#else + = __xmlParserVersion(); +#endif + if (xmlVersion != nullptr) logger->log(" libxml2: %s", *xmlVersion); #endif // ENABLE_LIBXML |