From 059e1dcb79a47e7605948f1a5be04e98f68167ec Mon Sep 17 00:00:00 2001 From: Jeremy Volkman Date: Tue, 31 May 2022 15:08:10 -0700 Subject: [PATCH] Update to handle rename of java_names.h to names.h in protobuf upstream (#9218) --- compiler/src/java_plugin/cpp/java_generator.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/compiler/src/java_plugin/cpp/java_generator.cpp b/compiler/src/java_plugin/cpp/java_generator.cpp index 6882940378f..3bb56ae12ee 100644 --- a/compiler/src/java_plugin/cpp/java_generator.cpp +++ b/compiler/src/java_plugin/cpp/java_generator.cpp @@ -22,11 +22,18 @@ #include #include #include -#include #include #include #include #include +#include + +// Protobuf 3.21 changed the name of this file. +#if GOOGLE_PROTOBUF_VERSION >= 3021000 + #include +#else + #include +#endif // Stringify helpers used solely to cast GRPC_VERSION #ifndef STR