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.
This commit is contained in:
parent
2e01b157d6
commit
8ca674d461
2
source/third_party/cppformat/format.cpp
vendored
2
source/third_party/cppformat/format.cpp
vendored
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user