aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/util/field_comparator_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/util/field_comparator_test.cc')
-rw-r--r--src/google/protobuf/util/field_comparator_test.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/google/protobuf/util/field_comparator_test.cc b/src/google/protobuf/util/field_comparator_test.cc
index 748c7d11..6fd631d8 100644
--- a/src/google/protobuf/util/field_comparator_test.cc
+++ b/src/google/protobuf/util/field_comparator_test.cc
@@ -34,9 +34,14 @@
#include <google/protobuf/unittest.pb.h>
#include <google/protobuf/descriptor.h>
-#include <gtest/gtest.h>
#include <google/protobuf/stubs/mathutil.h>
-
+// This gtest header is put after mathutil.h intentionally. We have to do
+// this because mathutil.h includes mathlimits.h which requires cmath not
+// being included to compile on some versions of gcc:
+// https://github.com/google/protobuf/blob/818c5eee08840355d70d2f3bdf1a2f17986a5e70/src/google/protobuf/stubs/mathlimits.h#L48
+// and the opensource version gtest.h header includes cmath transitively
+// somehow.
+#include <gtest/gtest.h>
namespace google {
namespace protobuf {
namespace util {