chromium/chromium-62.0.3202.62-correct-cplusplus-check.patch

21 lines
1.1 KiB
Diff
Raw Normal View History

2017-10-24 20:59:02 +00:00
diff -up chromium-62.0.3202.62/third_party/crc32c/src/include/crc32c/crc32c.h.fix-cplusplus-conditional chromium-62.0.3202.62/third_party/crc32c/src/include/crc32c/crc32c.h
--- chromium-62.0.3202.62/third_party/crc32c/src/include/crc32c/crc32c.h.fix-cplusplus-conditional 2017-10-17 15:12:35.000000000 -0400
+++ chromium-62.0.3202.62/third_party/crc32c/src/include/crc32c/crc32c.h 2017-10-19 11:41:45.860279576 -0400
@@ -38,6 +38,8 @@ inline uint32_t Crc32c(const std::string
// Visual Studio provides a <string_view> header even in C++11 mode. When
// included, the header issues an #error. (C1189)
#if !defined(_MSC_VER) || __cplusplus >= 201703L
+// GCC issues an #error if __cplusplus <= 201402L
+#if defined(__GNUC__) && __cplusplus > 201402L
#include <string_view>
// Comptues the CRC32C of the bytes in the string_view.
@@ -46,6 +48,7 @@ inline uint32_t Crc32c(const std::string
string_view.size());
}
+#endif // defined(__GNUC__) && __cplusplus > 201402L
#endif // !defined(_MSC_VER) || __cplusplus >= 201703L
#endif // __has_include(<string_view>)
#endif // defined(__has_include)