aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@gmail.com>2017-07-17 10:52:34 -0700
committerGravatar GitHub <noreply@github.com>2017-07-17 10:52:34 -0700
commitdd6e420dc41c7c55bfeac6a87e91903e883112f9 (patch)
tree74e91cd2d90611f8a8e7a4fd0e4f607a474a8020 /src/google
parenteb8e3d3220f066cde610c48af9287cadb36a5779 (diff)
parent81142e162b7eea2c3f3483a11ce13a7fb5c20b88 (diff)
Merge pull request #3357 from bklarson/master
Fix build when using -Werror=undef
Diffstat (limited to 'src/google')
-rw-r--r--src/google/protobuf/io/coded_stream.h2
-rw-r--r--src/google/protobuf/stubs/hash.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/google/protobuf/io/coded_stream.h b/src/google/protobuf/io/coded_stream.h
index 20d86143..9f1cf88c 100644
--- a/src/google/protobuf/io/coded_stream.h
+++ b/src/google/protobuf/io/coded_stream.h
@@ -1434,7 +1434,7 @@ inline bool CodedInputStream::IsFlat() const {
} // namespace protobuf
-#if _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
+#if defined(_MSC_VER) && _MSC_VER >= 1300 && !defined(__INTEL_COMPILER)
#pragma runtime_checks("c", restore)
#endif // _MSC_VER && !defined(__INTEL_COMPILER)
diff --git a/src/google/protobuf/stubs/hash.h b/src/google/protobuf/stubs/hash.h
index 5924de98..612b5861 100644
--- a/src/google/protobuf/stubs/hash.h
+++ b/src/google/protobuf/stubs/hash.h
@@ -42,7 +42,7 @@
#define GOOGLE_PROTOBUF_HAVE_HASH_SET 1
// Use C++11 unordered_{map|set} if available.
-#if ((_LIBCPP_STD_VER >= 11) || \
+#if ((defined(_LIBCPP_STD_VER) && _LIBCPP_STD_VER >= 11) || \
(((__cplusplus >= 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X)) && \
(__GLIBCXX__ > 20090421)))
# define GOOGLE_PROTOBUF_HAS_CXX11_HASH