From 7744e84607c8a81a623dabf54fd9714a502fc572 Mon Sep 17 00:00:00 2001 From: Benbuck Nason Date: Sat, 18 May 2024 05:23:34 -0700 Subject: [PATCH] ssp_config.h: Fix ifdef for android random api (#3444) It looks like the preferred preprocessor check for Android is `__ANDROID__` instead of `ANDROID`: https://groups.google.com/g/android-ndk/c/cf9_f1SLXls Change `(defined(ANDROID) && __ANDROID_API__ < 28)` to `((defined(ANDROID) || defined(__ANDROID__)) && (__ANDROID_API__ < 28))`. --- .../libc-wasi/sandboxed-system-primitives/src/ssp_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h index 298dea67..bd9c5e93 100644 --- a/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h +++ b/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/ssp_config.h @@ -18,7 +18,7 @@ #include "gnuc.h" #if defined(__FreeBSD__) || defined(__APPLE__) \ - || (defined(ANDROID) && __ANDROID_API__ < 28) + || ((defined(ANDROID) || defined(__ANDROID__)) && (__ANDROID_API__ < 28)) #define CONFIG_HAS_ARC4RANDOM_BUF 1 #else #define CONFIG_HAS_ARC4RANDOM_BUF 0