]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
neorados: compile with fmt v9 48629/head
authorTim Serong <tserong@suse.com>
Wed, 26 Oct 2022 09:42:53 +0000 (20:42 +1100)
committerTim Serong <tserong@suse.com>
Wed, 26 Oct 2022 23:36:07 +0000 (10:36 +1100)
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 <tserong@suse.com>
src/include/neorados/RADOS_Decodable.hpp
src/tools/neorados.cc

index 9654a84898a1848db245e5f702f545bd93149146..83d065b3f0b15cd4f66de4b4f16c890e6a359e1c 100644 (file)
 #include <utility>
 #include <vector>
 
+#include <fmt/core.h>
+#if FMT_VERSION >= 90000
+#include <fmt/ostream.h>
+#endif
+
 namespace neorados {
 struct Entry {
   std::string nspace;
@@ -104,4 +109,8 @@ struct hash<::neorados::Entry> {
 };
 }
 
+#if FMT_VERSION >= 90000
+template <> struct fmt::formatter<neorados::Entry> : ostream_formatter {};
+#endif
+
 #endif // RADOS_DECODABLE_HPP
index 516dfbce7fe6e9cc77c22ba482f317866c2a6fad..24966d2aee5e43e8e700a00b228230f91f13352c 100644 (file)
@@ -293,6 +293,10 @@ const std::array commands = {
          "remove OBJECT in POOL"sv }
 };
 
+#if FMT_VERSION >= 90000
+template <> struct fmt::formatter<boost::program_options::options_description> : ostream_formatter {};
+#endif // FMT_VERSION
+
 int main(int argc, char* argv[])
 {
   const std::string_view prog(argv[0]);