diff options
| author | LC <mathew1800@gmail.com> | 2020-07-16 14:19:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-16 14:19:05 -0400 |
| commit | d987cf1ddec05f398969c2bbe0017cfdc76e07b6 (patch) | |
| tree | 716f2af5740d3fb7b121c436c873c085d156e96c /Source/Core/Common/CommonFuncs.cpp | |
| parent | b6ee3228be73284e91ad5514f3d38c0c71ef93d3 (diff) | |
| parent | f2cc3a29488a261bd40b951e940d50479250a3fd (diff) | |
Merge pull request #8957 from JosJuice/android-strerror-r
Add Android check for strerror_r variant
Diffstat (limited to 'Source/Core/Common/CommonFuncs.cpp')
| -rw-r--r-- | Source/Core/Common/CommonFuncs.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Common/CommonFuncs.cpp b/Source/Core/Common/CommonFuncs.cpp index a8c1abfea2..7c86ee8741 100644 --- a/Source/Core/Common/CommonFuncs.cpp +++ b/Source/Core/Common/CommonFuncs.cpp @@ -29,7 +29,8 @@ std::string LastStrerrorString() // We check defines in order to figure out variant is in use, and we store the returned value // to a variable so that we'll get a compile-time check that our assumption was correct. -#if defined(__GLIBC__) && (_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600)) +#if (defined(__GLIBC__) || __ANDROID_API__ >= 23) && \ + (_GNU_SOURCE || (_POSIX_C_SOURCE < 200112L && _XOPEN_SOURCE < 600)) const char* str = strerror_r(errno, error_message, BUFFER_SIZE); return std::string(str); #else |
