diff options
author | Tim Serong <tserong@suse.com> | 2022-10-26 11:42:53 +0200 |
---|---|---|
committer | Tim Serong <tserong@suse.com> | 2022-10-27 01:36:07 +0200 |
commit | fe1e6b6c4eb55cd2103309a957a8baecc473021a (patch) | |
tree | 7fac3e7138d1cb184f33815c363d828861d35333 /src | |
parent | Merge PR #43284 into main (diff) | |
download | ceph-fe1e6b6c4eb55cd2103309a957a8baecc473021a.tar.xz ceph-fe1e6b6c4eb55cd2103309a957a8baecc473021a.zip |
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 <tserong@suse.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/neorados/RADOS_Decodable.hpp | 9 | ||||
-rw-r--r-- | src/tools/neorados.cc | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/include/neorados/RADOS_Decodable.hpp b/src/include/neorados/RADOS_Decodable.hpp index 9654a84898a..83d065b3f0b 100644 --- a/src/include/neorados/RADOS_Decodable.hpp +++ b/src/include/neorados/RADOS_Decodable.hpp @@ -24,6 +24,11 @@ #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 diff --git a/src/tools/neorados.cc b/src/tools/neorados.cc index 516dfbce7fe..24966d2aee5 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<boost::program_options::options_description> : ostream_formatter {}; +#endif // FMT_VERSION + int main(int argc, char* argv[]) { const std::string_view prog(argv[0]); |