From 8ca674d4613abc847c031d1ef7bdb5370a683f78 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Fri, 23 Jan 2015 21:15:48 +0000 Subject: [PATCH] cppformat: Fix Android build. The NDK only exposes the BSD-style strerror_r, not the GNU-style, so select the appropriate code path. This was SVN commit r16208. --- source/third_party/cppformat/format.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/third_party/cppformat/format.cpp b/source/third_party/cppformat/format.cpp index 674c801b97..b90d629f74 100644 --- a/source/third_party/cppformat/format.cpp +++ b/source/third_party/cppformat/format.cpp @@ -431,7 +431,7 @@ int fmt::internal::safe_strerror( int error_code, char *&buffer, std::size_t buffer_size) FMT_NOEXCEPT(true) { assert(buffer != 0 && buffer_size != 0); int result = 0; -#ifdef _GNU_SOURCE +#if defined(_GNU_SOURCE) && !defined(__BIONIC__) char *message = strerror_r(error_code, buffer, buffer_size); // If the buffer is full then the message is probably truncated. if (message == buffer && strlen(buffer) == buffer_size - 1)