ports/devel/protobuf-c/patches/patch-protoc-c_c_file_cc

18 lines
519 B
Text
Raw Normal View History

2023-09-17 04:05:06 +00:00
https://github.com/protobuf-c/protobuf-c/pull/673
Index: protoc-c/c_file.cc
--- protoc-c/c_file.cc.orig
+++ protoc-c/c_file.cc
@@ -119,7 +119,11 @@ void FileGenerator::GenerateHeader(io::Printer* printe
int min_header_version = 1000000;
#if defined(HAVE_PROTO3)
+# if GOOGLE_PROTOBUF_VERSION >= 4023000
+ if (FileDescriptorLegacy(file_).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3) {
+# else
if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) {
+#endif
min_header_version = 1003000;
}
#endif