avro-cpp: fix build with fmt 11 (#452150)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
diff --git a/include/avro/Node.hh b/include/avro/Node.hh
|
||||
--- a/include/avro/Node.hh
|
||||
+++ b/include/avro/Node.hh
|
||||
@@ -219,7 +219,7 @@ template<>
|
||||
struct fmt::formatter<avro::Name> : fmt::formatter<std::string> {
|
||||
template<typename FormatContext>
|
||||
- auto format(const avro::Name &n, FormatContext &ctx) {
|
||||
+ auto format(const avro::Name &n, FormatContext &ctx) const {
|
||||
return fmt::formatter<std::string>::format(n.fullname(), ctx);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
diff --git a/include/avro/Types.hh b/include/avro/Types.hh
|
||||
--- a/include/avro/Types.hh
|
||||
+++ b/include/avro/Types.hh
|
||||
@@ -113,7 +113,7 @@ template<>
|
||||
struct fmt::formatter<avro::Type> : fmt::formatter<std::string> {
|
||||
template<typename FormatContext>
|
||||
- auto format(avro::Type t, FormatContext &ctx) {
|
||||
+ auto format(avro::Type t, FormatContext &ctx) const {
|
||||
return fmt::formatter<std::string>::format(avro::toString(t), ctx);
|
||||
}
|
||||
};
|
||||
@@ -18,8 +18,12 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-8u33cSanWw7BrRZncr4Fg1HOo9dESL5+LO8gBQwPmKs=";
|
||||
};
|
||||
|
||||
# TODO: remove fmt formatter patches when updating to next version
|
||||
# Patches exist upstream but don't apply cleanly.
|
||||
patches = [
|
||||
./0001-get-rid-of-fmt-fetchcontent.patch
|
||||
./0002-fix-fmt-name-formatter.patch
|
||||
./0003-fix-fmt-type-formatter.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
Reference in New Issue
Block a user