Browse Source

tools: Fix protobuf compiler build with recent compilers

This is a manual backport of
01a05a53f4

(cherry picked from commit c580054e4f)

Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
pull/135/head
Hugo Beauzée-Luyssen 5 years ago
committed by Steve Lhomme
parent
commit
962cadadaf
  1. 11
      extras/tools/protobuf-fix-build.patch
  2. 1
      extras/tools/tools.mak

11
extras/tools/protobuf-fix-build.patch

@ -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
extras/tools/tools.mak

@ -328,6 +328,7 @@ protobuf-$(PROTOBUF_VERSION).tar.gz:
protobuf: protobuf-$(PROTOBUF_VERSION).tar.gz
$(UNPACK)
$(APPLY) $(TOOLS)/protobuf-fix-build.patch
$(MOVE)
.buildprotoc: protobuf

Loading…
Cancel
Save