From: Radoslaw Zarzynski Date: Tue, 17 Jan 2023 19:11:44 +0000 (+0000) Subject: crush: fix compilation guard around specialization for libfmt => 9 X-Git-Tag: v19.0.0~1577^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4cb969b0c439381b2038134c81faa9a649629e1f;p=ceph.git crush: fix compilation guard around specialization for libfmt => 9 ``` [ 77%] Building CXX object src/crimson/CMakeFiles/crimson-common.dir/__/crush/CrushLocation.cc.o In file included from /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/18.0.0-1862-g7689999c/rpm/el8/BUILD/ceph-18.0.0-1862-g7689999c/src/common/ceph_context.h:47, from /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/18.0.0-1862-g7689999c/rpm/el8/BUILD/ceph-18.0.0-1862-g7689999c/src/crush/CrushLocation.cc:11: /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/18.0.0-1862-g7689999c/rpm/el8/BUILD/ceph-18.0.0-1862-g7689999c/src/crush/CrushLocation.h:43:25: error: redefinition of ‘struct fmt::v9::formatter’ 43 | template <> struct fmt::formatter : fmt::ostream_formatter {}; ``` Signed-off-by: Radoslaw Zarzynski --- diff --git a/src/crush/CrushLocation.h b/src/crush/CrushLocation.h index 2d2d4b52b966..026ad107d833 100644 --- a/src/crush/CrushLocation.h +++ b/src/crush/CrushLocation.h @@ -37,8 +37,9 @@ private: std::ostream& operator<<(std::ostream& os, const CrushLocation& loc); } -#endif #if FMT_VERSION >= 90000 template <> struct fmt::formatter : fmt::ostream_formatter {}; #endif + +#endif