diff options
Diffstat (limited to 'src/common/error.cpp')
| -rw-r--r-- | src/common/error.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/error.cpp b/src/common/error.cpp index ddb03bd45..1b2009db7 100644 --- a/src/common/error.cpp +++ b/src/common/error.cpp | |||
| @@ -30,7 +30,8 @@ std::string NativeErrorToString(int e) { | |||
| 30 | return ret; | 30 | return ret; |
| 31 | #else | 31 | #else |
| 32 | char err_str[255]; | 32 | char err_str[255]; |
| 33 | #if defined(__GLIBC__) && (_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600)) | 33 | #if defined(ANDROID) || \ |
| 34 | (defined(__GLIBC__) && (_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600))) | ||
| 34 | // Thread safe (GNU-specific) | 35 | // Thread safe (GNU-specific) |
| 35 | const char* str = strerror_r(e, err_str, sizeof(err_str)); | 36 | const char* str = strerror_r(e, err_str, sizeof(err_str)); |
| 36 | return std::string(str); | 37 | return std::string(str); |