Skip to content

Commit 822a8a5

Browse files
authored
wasm_native.c: Fix build with certain combinations of options (#1778)
Fix a regression in #1756
1 parent 191e4a8 commit 822a8a5

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

core/iwasm/common/wasm_native.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,11 @@ wasm_native_unregister_natives(const char *module_name,
379379
bool
380380
wasm_native_init()
381381
{
382-
#if WASM_ENABLE_SPEC_TEST != 0 || WASM_ENABLE_LIBC_BUILTIN != 0 \
383-
|| WASM_ENABLE_BASE_LIB != 0 || WASM_ENABLE_LIBC_EMCC != 0 \
384-
|| WASM_ENABLE_LIB_RATS != 0 || WASM_ENABLE_WASI_NN != 0 \
385-
|| WASM_ENABLE_APP_FRAMEWORK != 0
382+
#if WASM_ENABLE_SPEC_TEST != 0 || WASM_ENABLE_LIBC_BUILTIN != 0 \
383+
|| WASM_ENABLE_BASE_LIB != 0 || WASM_ENABLE_LIBC_EMCC != 0 \
384+
|| WASM_ENABLE_LIB_RATS != 0 || WASM_ENABLE_WASI_NN != 0 \
385+
|| WASM_ENABLE_APP_FRAMEWORK != 0 || WASM_ENABLE_LIBC_WASI != 0 \
386+
|| WASM_ENABLE_LIB_PTHREAD != 0
386387
NativeSymbol *native_symbols;
387388
uint32 n_native_symbols;
388389
#endif
@@ -461,10 +462,11 @@ wasm_native_init()
461462
#endif
462463

463464
return true;
464-
#if WASM_ENABLE_SPEC_TEST != 0 || WASM_ENABLE_LIBC_BUILTIN != 0 \
465-
|| WASM_ENABLE_BASE_LIB != 0 || WASM_ENABLE_LIBC_EMCC != 0 \
466-
|| WASM_ENABLE_LIB_RATS != 0 || WASM_ENABLE_WASI_NN != 0 \
467-
|| WASM_ENABLE_APP_FRAMEWORK != 0
465+
#if WASM_ENABLE_SPEC_TEST != 0 || WASM_ENABLE_LIBC_BUILTIN != 0 \
466+
|| WASM_ENABLE_BASE_LIB != 0 || WASM_ENABLE_LIBC_EMCC != 0 \
467+
|| WASM_ENABLE_LIB_RATS != 0 || WASM_ENABLE_WASI_NN != 0 \
468+
|| WASM_ENABLE_APP_FRAMEWORK != 0 || WASM_ENABLE_LIBC_WASI != 0 \
469+
|| WASM_ENABLE_LIB_PTHREAD != 0
468470
fail:
469471
wasm_native_destroy();
470472
return false;

0 commit comments

Comments
 (0)