Skip to content

Commit 32b560d

Browse files
committed
fix build without wasi
1 parent 92164f8 commit 32b560d

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

core/iwasm/common/wasm_runtime_common.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,9 @@ void
16481648
wasm_runtime_instantiation_args_set_defaults(struct InstantiationArgs2 *args)
16491649
{
16501650
memset(args, 0, sizeof(*args));
1651+
#if WASM_ENABLE_LIBC_WASI != 0
16511652
wasi_args_set_defaults(&args->wasi);
1653+
#endif
16521654
}
16531655

16541656
WASMModuleInstanceCommon *
@@ -1715,6 +1717,7 @@ wasm_runtime_instantiation_args_set_max_memory_pages(
17151717
p->v1.max_memory_pages = v;
17161718
}
17171719

1720+
#if WASM_ENABLE_LIBC_WASI != 0
17181721
void
17191722
wasm_runtime_instantiation_args_set_wasi_arg(struct InstantiationArgs2 *p,
17201723
char *argv[], int argc)
@@ -1790,6 +1793,7 @@ wasm_runtime_instantiation_args_set_wasi_ns_lookup_pool(
17901793
wasi_args->ns_lookup_count = ns_lookup_pool_size;
17911794
wasi_args->set_by_user = true;
17921795
}
1796+
#endif /* WASM_ENABLE_LIBC_WASI != 0 */
17931797

17941798
WASMModuleInstanceCommon *
17951799
wasm_runtime_instantiate_ex2(WASMModuleCommon *module,

core/iwasm/common/wasm_runtime_common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,9 @@ wasm_runtime_get_exec_env_tls(void);
614614

615615
struct InstantiationArgs2 {
616616
InstantiationArgs v1;
617+
#if WASM_ENABLE_LIBC_WASI != 0
617618
WASIArguments wasi;
619+
#endif
618620
};
619621

620622
void

0 commit comments

Comments
 (0)