From: Tim Serong Date: Wed, 26 Oct 2022 09:42:53 +0000 (+1100) Subject: neorados: compile with fmt v9 X-Git-Tag: v18.1.0~948^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F48629%2Fhead;p=ceph.git neorados: compile with fmt v9 neorados FTBFS on openSUSE Tumbleweed which includes fmt version 9. On the assumption it's still desirable to support building with older versions, I've put "#if FMT_VERSION" guards around the additions here. Signed-off-by: Tim Serong --- diff --git a/src/include/neorados/RADOS_Decodable.hpp b/src/include/neorados/RADOS_Decodable.hpp index 9654a84898a1..83d065b3f0b1 100644 --- a/src/include/neorados/RADOS_Decodable.hpp +++ b/src/include/neorados/RADOS_Decodable.hpp @@ -24,6 +24,11 @@ #include #include +#include +#if FMT_VERSION >= 90000 +#include +#endif + namespace neorados { struct Entry { std::string nspace; @@ -104,4 +109,8 @@ struct hash<::neorados::Entry> { }; } +#if FMT_VERSION >= 90000 +template <> struct fmt::formatter : ostream_formatter {}; +#endif + #endif // RADOS_DECODABLE_HPP diff --git a/src/tools/neorados.cc b/src/tools/neorados.cc index 516dfbce7fe6..24966d2aee5e 100644 --- a/src/tools/neorados.cc +++ b/src/tools/neorados.cc @@ -293,6 +293,10 @@ const std::array commands = { "remove OBJECT in POOL"sv } }; +#if FMT_VERSION >= 90000 +template <> struct fmt::formatter : ostream_formatter {}; +#endif // FMT_VERSION + int main(int argc, char* argv[]) { const std::string_view prog(argv[0]);