From 4e6bd0d96eff5586f77276f4689467d9fa8753d5 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Fri, 24 Apr 2026 09:11:00 +0200 Subject: [PATCH] change libxml2 deprecated since libxml2 2.10 --- builder/builder | 2 +- src/CMakeLists.txt | 6 +++--- src/xml.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/builder/builder b/builder/builder index db6377f..c737594 100755 --- a/builder/builder +++ b/builder/builder @@ -33,7 +33,7 @@ run_build_container() main() { - local distros="debian:oldstable debian:stable debian:testing" + local distros="debian:oldstable debian:stable debian:testing ubuntu:latest ubuntu:rolling" mkdir -p build cp builder/run build/run diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 79d3c6a..b5088f8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,9 +7,9 @@ include(GNUInstallDirs) find_package(LibXml2 REQUIRED) message(STATUS "find LibXml2: " ${LIBXML2_LIBRARY}) -if(${LIBXML2_VERSION_STRING} VERSION_GREATER_EQUAL "2.15.0") - message(STATUS "define LIBXML2_15") - add_compile_definitions(LIBXML2_15) +if(${LIBXML2_VERSION_STRING} VERSION_GREATER_EQUAL 2.10) + message(STATUS "define LIBXML2_10") + add_compile_definitions(LIBXML2_10) endif() message(STATUS "CMAKE_INSTALL_PREFIX " ${CMAKE_INSTALL_PREFIX}) diff --git a/src/xml.c b/src/xml.c index 5917561..20af6c5 100644 --- a/src/xml.c +++ b/src/xml.c @@ -295,7 +295,7 @@ void init_time_acount(const uint8_t hour, const uint8_t min) xmlFreeTextWriter(xmlWriter); xmlWriter = NULL; -#ifdef LIBXML2_15 +#ifdef LIBXML2_10 xmlCleanupParser(); #else xmlDictCleanup(); @@ -356,7 +356,7 @@ void add_entry(const char* date, xmlFreeTextReader(xmlreader); xmlreader = NULL; -#ifdef LIBXML2_15 +#ifdef LIBXML2_10 xmlCleanupParser(); #else xmlCleanupCharEncodingHandlers(); @@ -425,7 +425,7 @@ void merge(const char* dir) xmlFreeTextWriter(xmlwriter); xmlwriter = NULL; -#ifdef LIBXML2_15 +#ifdef LIBXML2_10 xmlCleanupParser(); #else xmlCleanupCharEncodingHandlers(); -- 2.47.3