strerror.patch 503 B

12345678910111213
  1. diff --git a/src/exception.cpp b/src/exception.cpp
  2. index 72aae7e..16d11ad 100644
  3. --- a/src/exception.cpp
  4. +++ b/src/exception.cpp
  5. @@ -66,7 +66,7 @@ string sys_error::error_str(int err)
  6. buf, sizeof(buf), NULL);
  7. #else
  8. #ifdef _GNU_SOURCE
  9. - #if !defined(__GLIBC__)
  10. + #if (!defined(__GLIBC__) && !defined(__ANDROID_API__)) || (defined(__ANDROID_API__) && __ANDROID_API__ < 23)
  11. // use the XSI standard behavior.
  12. int e = strerror_r(err, buf, sizeof(buf));
  13. auto s = strerror(e);