Skip to content

Commit

Permalink
Fix GNU strerror_r check for Android.
Browse files Browse the repository at this point in the history
Summary:
Bionic didn't get a GNU style strerror_r until Android M. Until then
we unconditionally exposed the POSIX one. Expand the check to account
for this.

Reviewers: pirama, AndreyChurbanov, jlpeyton

Reviewed By: jlpeyton

Subscribers: openmp-commits, srhines

Differential Revision: https://reviews.llvm.org/D30056

llvm-svn: 297235
  • Loading branch information
DanAlbert committed Mar 7, 2017
1 parent 14ab3e6 commit 1dc735b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion openmp/runtime/src/kmp_i18n.cpp
Expand Up @@ -819,7 +819,9 @@ sys_error(
int strerror_r( int, char *, size_t ); // XSI version
*/

#if defined(__GLIBC__) && defined(_GNU_SOURCE)
#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || \
(defined(__BIONIC__) && defined(_GNU_SOURCE) && \
__ANDROID_API__ >= __ANDROID_API_M__)

// GNU version of strerror_r.

Expand Down

0 comments on commit 1dc735b

Please sign in to comment.