protobuf-c/backport-protoc-c-c_file.cc-Remove-HAVE_PROTO3-conditional.patch
SuperSix173 45e78a6a9e downgrade to 1.4.1 to match the 24.03 LTS's minimum set of core packages
Signed-off-by: SuperSix173 <liuchao173@huawei.com>
2024-02-27 22:56:55 +08:00

35 lines
1.0 KiB
Diff

From 7ed03a715bce3eab94eb77b66378c984bf7e633a Mon Sep 17 00:00:00 2001
From: Robert Edmonds <edmonds@users.noreply.github.com>
Date: Sat, 8 Jul 2023 23:13:59 -0400
Subject: [PATCH 3/5] protoc-c/c_file.cc: Remove HAVE_PROTO3 conditional
---
protoc-c/c_file.cc | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/protoc-c/c_file.cc b/protoc-c/c_file.cc
index d211a3d..ca0ad34 100644
--- a/protoc-c/c_file.cc
+++ b/protoc-c/c_file.cc
@@ -118,15 +118,13 @@ void FileGenerator::GenerateHeader(io::Printer* printer) {
std::string filename_identifier = FilenameIdentifier(file_->name());
int min_header_version = 1000000;
-#if defined(HAVE_PROTO3)
-# if GOOGLE_PROTOBUF_VERSION >= 4023000
+#if GOOGLE_PROTOBUF_VERSION >= 4023000
if (FileDescriptorLegacy(file_).syntax() == FileDescriptorLegacy::SYNTAX_PROTO3) {
-# else
+#else
if (file_->syntax() == FileDescriptor::SYNTAX_PROTO3) {
#endif
min_header_version = 1003000;
}
-#endif
// Generate top of header.
printer->Print(
--
2.33.0