From b8fbbb1b99505055f190f09538164f9eec68e198 Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Thu, 12 Sep 2024 19:15:17 +0000 Subject: [PATCH] offline: Update usage of toml11-devel Resolves https://github.com/rpm-software-management/dnf5/issues/1693. --- libdnf5/transaction/offline.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libdnf5/transaction/offline.cpp b/libdnf5/transaction/offline.cpp index ee06c9daf..9beeb7c7f 100644 --- a/libdnf5/transaction/offline.cpp +++ b/libdnf5/transaction/offline.cpp @@ -207,7 +207,11 @@ void OfflineTransactionState::read() { void OfflineTransactionState::write() { auto file = libdnf5::utils::fs::File(p_impl->path, "w"); +#ifdef TOML11_COMPAT file.write(toml::format(toml::value{{STATE_HEADER, p_impl->data.p_impl->data}})); +#else + file.write(toml::format(toml::value{toml::table{{STATE_HEADER, p_impl->data.p_impl->data}}})); +#endif file.close(); }