summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authortorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-21 12:05:40 +0000
committertorne@chromium.org <torne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-21 12:07:05 +0000
commitac38465bd084fb636826874c37ba8aa26a5d6814 (patch)
treebeadb5761791c2e9558d4f602cafc99bc9521428 /base
parent61b27e8e872841f8e3c7bd899747403f7172df49 (diff)
downloadchromium_src-ac38465bd084fb636826874c37ba8aa26a5d6814.zip
chromium_src-ac38465bd084fb636826874c37ba8aa26a5d6814.tar.gz
chromium_src-ac38465bd084fb636826874c37ba8aa26a5d6814.tar.bz2
Handle bionic in safe_strerror_posix as well as glibc.
Android's bionic C library is intending to adopt the same semantics as glibc for strerror_r: define the version that returns char* if the source is compiled with _GNU_SOURCE instead of the POSIX version which returns int. Add __BIONIC__ to the condition for USE_HISTORICAL_STRERRO_R so that Chromium will still work. BUG= Review URL: https://codereview.chromium.org/491893002 Cr-Commit-Position: refs/heads/master@{#291050} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@291050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/safe_strerror_posix.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/safe_strerror_posix.cc b/base/safe_strerror_posix.cc
index a91bb8d..892592a 100644
--- a/base/safe_strerror_posix.cc
+++ b/base/safe_strerror_posix.cc
@@ -9,7 +9,8 @@
#include <stdio.h>
#include <string.h>
-#define USE_HISTORICAL_STRERRO_R (defined(__GLIBC__) || defined(OS_NACL))
+#define USE_HISTORICAL_STRERRO_R (defined(__GLIBC__) || defined(__BIONIC__) || \
+ defined(OS_NACL))
#if USE_HISTORICAL_STRERRO_R && defined(__GNUC__)
// GCC will complain about the unused second wrap function unless we tell it