[Openmp-commits] [PATCH] D30056: Fix GNU strerror_r check for Android.
Dan Albert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Feb 16 15:17:03 PST 2017
danalbert created this revision.
Herald added a subscriber: srhines.
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.
https://reviews.llvm.org/D30056
Files:
runtime/src/kmp_i18n.cpp
Index: runtime/src/kmp_i18n.cpp
===================================================================
--- runtime/src/kmp_i18n.cpp
+++ runtime/src/kmp_i18n.cpp
@@ -819,7 +819,9 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30056.88793.patch
Type: text/x-patch
Size: 548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20170216/543421ca/attachment.bin>
More information about the Openmp-commits
mailing list