diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h index 50051831d6..df0625c9a9 100644 --- a/src/google/protobuf/repeated_field.h +++ b/src/google/protobuf/repeated_field.h @@ -1307,11 +1307,11 @@ class RepeatedPtrIterator it_ += d; return *this; } - friend iterator operator+(iterator it, difference_type d) { + friend iterator operator+(iterator it, const difference_type d) { it += d; return it; } - friend iterator operator+(difference_type d, iterator it) { + friend iterator operator+(const difference_type d, iterator it) { it += d; return it; } diff --git a/src/google/protobuf/stubs/type_traits_unittest.cc b/src/google/protobuf/stubs/type_traits_unittest.cc index 7a8cbfb8b2..b42b9e835d 100644 --- a/src/google/protobuf/stubs/type_traits_unittest.cc +++ b/src/google/protobuf/stubs/type_traits_unittest.cc @@ -41,7 +41,10 @@ #include typedef int int32; +// IBM AIX typedefs `int64` in `sys/inttypes.h`, included transitively above. +#ifndef _AIX typedef long int64; +#endif using std::string; using std::vector;