From 22b3a91473d548456a0823f9f170db0d7db5a444 Mon Sep 17 00:00:00 2001 From: kyak Date: Wed, 12 Jan 2022 19:41:37 +0300 Subject: [PATCH] Fix for fmt > 8.0 Upstream-Status: Backport [https://github.com/gerbera/gerbera/commit/82d84ac5e62c23e717198fc7b2ef190ff95e70d1] Signed-off-by: Khem Raj --- src/util/logger.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/util/logger.h b/src/util/logger.h index 8a8f0b1f..0a512bff 100644 --- a/src/util/logger.h +++ b/src/util/logger.h @@ -32,7 +32,9 @@ #ifndef __LOGGER_H__ #define __LOGGER_H__ +#include #include +#include #define log_debug SPDLOG_DEBUG #define log_info SPDLOG_INFO @@ -40,4 +42,17 @@ #define log_error SPDLOG_ERROR #define log_js SPDLOG_INFO +#if FMT_VERSION >= 80100 +template +struct fmt::formatter, char>> + : formatter> { + template + auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out()) + { + return fmt::formatter>::format( + static_cast>(value), ctx); + } +}; +#endif + #endif // __LOGGER_H__ -- 2.35.0