Enable Android libc wasi support. (#590)

Some libc APIs required by wasi native lib are missing in some Android API versions, only when the version >= 24, all APIs are supported. Add the missing APIs in android platform layer, leave them empty, report error and return failed if they are called. Also update CMakeLists.txt to enable libc wasi by default.

Co-authored-by: Wenyong Huang <wenyong.huang@intel.com>
This commit is contained in:
Javan
2021-03-24 15:53:55 +08:00
committed by GitHub
parent be54b4c7cc
commit 8f902fa9ae
4 changed files with 125 additions and 2 deletions

View File

@ -14,7 +14,7 @@
#include <stdlib.h>
#if defined(__FreeBSD__) || defined(__APPLE__)
#if defined(__FreeBSD__) || defined(__APPLE__) || (defined(ANDROID) && __ANDROID_API__ < 28)
#define CONFIG_HAS_ARC4RANDOM_BUF 1
#else
#define CONFIG_HAS_ARC4RANDOM_BUF 0