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

git-svn-id: https://llvm.org/svn/llvm-project/openmp/trunk@297235 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/runtime/src/kmp_i18n.cpp b/runtime/src/kmp_i18n.cpp
index ea4f30e..992d1fe 100644
--- a/runtime/src/kmp_i18n.cpp
+++ b/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.