[Openmp-commits] [openmp] [OpenMP] Simplify GNU strerror_r check for Android (PR #148990)
via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jul 16 05:03:45 PDT 2025
================
@@ -708,9 +708,7 @@ static char *sys_error(int err) {
int strerror_r( int, char *, size_t ); // XSI version
*/
-#if (defined(__GLIBC__) && defined(_GNU_SOURCE)) || \
- (defined(__BIONIC__) && defined(_GNU_SOURCE) && \
- __ANDROID_API__ >= __ANDROID_API_M__)
----------------
enh-google wrote:
openmp is distributed as part of the NDK, so i think it's too early to drop apis 21 and 22.
@pirama-arumuga-nainar though, because for all i know we already only build openmp at a higher api level, so it's already broken.
actually, i can just check myself...
```
~/Downloads/android-ndk-r28b$ ~/toybox/toybox readelf -aW ./toolchains/llvm/prebuilt/linux-x86_64/lib/clang/19/lib/linux/aarch64/libomp.so | grep NT_VERSION
Android 0x00000084 NT_VERSION API level 21, NDK r27-beta1 (11883388)
~/Downloads/android-ndk-r28b$
```
if you wanted to `extern "C"` strerror_r() yourself, the XSI one has always been available, so you could remove bionic from this gnu side altogether (at the cost of either a manual `extern "C"` or not building with `_GNU_SOURCE`). but it's probably easier to just wait?
https://github.com/llvm/llvm-project/pull/148990
More information about the Openmp-commits
mailing list