wasm_native.c: Fix build with certain combinations of options (#1778)

Fix a regression in https://github.com/bytecodealliance/wasm-micro-runtime/pull/1756
This commit is contained in:
YAMAMOTO Takashi 2022-12-02 12:41:40 +09:00 committed by GitHub
parent 191e4a8663
commit 822a8a5e66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -379,10 +379,11 @@ wasm_native_unregister_natives(const char *module_name,
bool bool
wasm_native_init() wasm_native_init()
{ {
#if WASM_ENABLE_SPEC_TEST != 0 || WASM_ENABLE_LIBC_BUILTIN != 0 \ #if WASM_ENABLE_SPEC_TEST != 0 || WASM_ENABLE_LIBC_BUILTIN != 0 \
|| WASM_ENABLE_BASE_LIB != 0 || WASM_ENABLE_LIBC_EMCC != 0 \ || WASM_ENABLE_BASE_LIB != 0 || WASM_ENABLE_LIBC_EMCC != 0 \
|| WASM_ENABLE_LIB_RATS != 0 || WASM_ENABLE_WASI_NN != 0 \ || WASM_ENABLE_LIB_RATS != 0 || WASM_ENABLE_WASI_NN != 0 \
|| WASM_ENABLE_APP_FRAMEWORK != 0 || WASM_ENABLE_APP_FRAMEWORK != 0 || WASM_ENABLE_LIBC_WASI != 0 \
|| WASM_ENABLE_LIB_PTHREAD != 0
NativeSymbol *native_symbols; NativeSymbol *native_symbols;
uint32 n_native_symbols; uint32 n_native_symbols;
#endif #endif
@ -461,10 +462,11 @@ wasm_native_init()
#endif #endif
return true; return true;
#if WASM_ENABLE_SPEC_TEST != 0 || WASM_ENABLE_LIBC_BUILTIN != 0 \ #if WASM_ENABLE_SPEC_TEST != 0 || WASM_ENABLE_LIBC_BUILTIN != 0 \
|| WASM_ENABLE_BASE_LIB != 0 || WASM_ENABLE_LIBC_EMCC != 0 \ || WASM_ENABLE_BASE_LIB != 0 || WASM_ENABLE_LIBC_EMCC != 0 \
|| WASM_ENABLE_LIB_RATS != 0 || WASM_ENABLE_WASI_NN != 0 \ || WASM_ENABLE_LIB_RATS != 0 || WASM_ENABLE_WASI_NN != 0 \
|| WASM_ENABLE_APP_FRAMEWORK != 0 || WASM_ENABLE_APP_FRAMEWORK != 0 || WASM_ENABLE_LIBC_WASI != 0 \
|| WASM_ENABLE_LIB_PTHREAD != 0
fail: fail:
wasm_native_destroy(); wasm_native_destroy();
return false; return false;