Skip to content

Commit

Permalink
tools: Fix protobuf compiler build with recent compilers
Browse files Browse the repository at this point in the history
This is a manual backport of
protocolbuffers/protobuf@01a05a5
  • Loading branch information
chouquette committed Dec 14, 2021
1 parent 8758a17 commit c580054
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions extras/tools/protobuf-fix-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- protobuf/src/google/protobuf/compiler/java/java_file.cc.old 2021-12-13 14:57:55.210153925 +0100
+++ protobuf/src/google/protobuf/compiler/java/java_file.cc 2021-12-13 14:58:03.734181392 +0100
@@ -65,7 +65,7 @@
namespace {

struct FieldDescriptorCompare {
- bool operator ()(const FieldDescriptor* f1, const FieldDescriptor* f2) {
+ bool operator ()(const FieldDescriptor* f1, const FieldDescriptor* f2) const {
if(f1 == NULL) {
return false;
}
1 change: 1 addition & 0 deletions extras/tools/tools.mak
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ protobuf-$(PROTOBUF_VERSION).tar.gz:

protobuf: protobuf-$(PROTOBUF_VERSION).tar.gz
$(UNPACK)
$(APPLY) $(TOOLS)/protobuf-fix-build.patch
$(MOVE)

.buildprotoc: protobuf
Expand Down

0 comments on commit c580054

Please sign in to comment.