diff options
| author | Dan Albert <danalbert@google.com> | 2017-03-07 22:18:05 +0000 |
|---|---|---|
| committer | Dan Albert <danalbert@google.com> | 2017-03-07 22:18:05 +0000 |
| commit | 1dc735bf64bfde087c0d004e8be14987af19c6dc (patch) | |
| tree | b10e154d1fbb8306656e7dea015695d409e4caa2 /openmp/runtime/src | |
| parent | 14ab3e6885ba8e703889fc5e49fbe059d57b1eb6 (diff) | |
| download | bcm5719-llvm-1dc735bf64bfde087c0d004e8be14987af19c6dc.tar.gz bcm5719-llvm-1dc735bf64bfde087c0d004e8be14987af19c6dc.zip | |
Fix GNU strerror_r check for Android.
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
Diffstat (limited to 'openmp/runtime/src')
| -rw-r--r-- | openmp/runtime/src/kmp_i18n.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openmp/runtime/src/kmp_i18n.cpp b/openmp/runtime/src/kmp_i18n.cpp index ea4f30e1385..992d1fedea2 100644 --- a/openmp/runtime/src/kmp_i18n.cpp +++ b/openmp/runtime/src/kmp_i18n.cpp @@ -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. |

