aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/patch-base__strings__safe_sprintf.cc
blob: f1f5f83cc1fb9ce598814cb588377d06693e5a36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- ./base/strings/safe_sprintf.cc.orig	2014-08-20 21:02:42.000000000 +0200
+++ ./base/strings/safe_sprintf.cc	2014-08-22 15:06:24.000000000 +0200
@@ -107,11 +107,11 @@
       : buffer_(buffer),
         size_(size - 1),  // Account for trailing NUL byte
         count_(0) {
-// The following assertion does not build on Mac and Android. This is because
-// static_assert only works with compile-time constants, but mac uses
-// libstdc++4.2 and android uses stlport, which both don't mark
-// numeric_limits::max() as constexp.
-#if __cplusplus >= 201103 && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_IOS)
+// The following assertion does not build on Mac and Android and older FreeBSD.
+// This is because static_assert only works with compile-time constants, but
+// mac and FreeBSD < 10 use libstdc++4.2 and android uses stlport, which both
+// don't mark numeric_limits::max() as constexp.
+#if __cplusplus >= 201103 && !defined(OS_ANDROID) && !defined(OS_MACOSX) && !defined(OS_IOS) && !(defined(OS_FREEBSD) && __FreeBSD_version > 1000054)
     COMPILE_ASSERT(kSSizeMaxConst == \
                    static_cast<size_t>(std::numeric_limits<ssize_t>::max()),
                    kSSizeMax_is_the_max_value_of_an_ssize_t);