Przeglądaj źródła

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))`.
Benbuck Nason 1 rok temu
rodzic
commit
7744e84607

+ 1 - 1
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