diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/unittests/utils/dumplibs.cc | 7 | ||||
-rw-r--r-- | src/utils/dumplibs.cpp | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/unittests/utils/dumplibs.cc b/src/unittests/utils/dumplibs.cc index 594c90501..f23b2b7ec 100644 --- a/src/unittests/utils/dumplibs.cc +++ b/src/unittests/utils/dumplibs.cc @@ -57,7 +57,12 @@ TEST_CASE("dumplibs tests", "") #ifdef ENABLE_LIBXML SECTION("libxml2") { - const char *const *xmlVersion = __xmlParserVersion(); + const char *const *xmlVersion +#if LIBXML_VERSION > 21200 + = &xmlParserVersion; +#else + = __xmlParserVersion(); +#endif REQUIRE(xmlVersion != nullptr); REQUIRE(*xmlVersion != nullptr); REQUIRE(std::string(*xmlVersion) == 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 |