Skip to content

Commit 3ae0f34

Browse files
committed
common: Include <fmt/format.h> for fmt::format in string.hpp
string.hpp calls fmt::format and fmt::vformat but only included <fmt/core.h>. As of fmt 12, <fmt/core.h> was reduced to a shim and the format/vformat entry points moved to <fmt/format.h>, so building against a system fmt 12.x fails with "no member named 'format' in namespace 'fmt'" in every translation unit that pulls in string.hpp. Include <fmt/format.h> instead. It is a superset of the old core.h, so this is backward compatible with older fmt releases while restoring the build on fmt 12. Signed-off-by: Razvan Cojocaru <razvan.cojocaru@openvpn.com>
1 parent 2c889af commit 3ae0f34

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

openvpn/common/string.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <algorithm>
2323
#include <optional>
2424

25-
#include <fmt/core.h>
25+
#include <fmt/format.h>
2626

2727
#include <openvpn/common/platform.hpp>
2828
#include <openvpn/common/size.hpp>

0 commit comments

Comments
 (0)