--- 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;
     }
