Fix linux-sgx build error when libc-wasi is disabled (#2997)
Compilation error was reported when `cmake -DWAMR_BUILD_LIBC_WASI=0`
on linux-sgx platform:
```
core/shared/platform/linux-sgx/sgx_socket.c:8:10:
fatal error: libc_errno.h: No such file or directory
8 | #include "libc_errno.h"
| ^~~~~~~~~~~~~~
```
After fixing, both `cmake -DWAMR_BUILD_LIBC_WASI=1` and
`WAMR_BUILD_LIBC_WASI=0` work good.
This commit is contained in:
@ -102,7 +102,7 @@ Enclave_Include_Paths := -IEnclave -I$(WAMR_ROOT)/core/iwasm/include \
|
||||
Enclave_C_Flags := $(SGX_COMMON_CFLAGS) -nostdinc -fvisibility=hidden -fpie -fstack-protector $(Enclave_Include_Paths)
|
||||
|
||||
# disable wasi
|
||||
Enclave_C_Flags += -DSGX_DISABLE_WASI
|
||||
Enclave_C_Flags += -DWASM_ENABLE_LIBC_WASI=0
|
||||
|
||||
ifeq ($(SPEC_TEST), 1)
|
||||
Enclave_C_Flags += -DWASM_ENABLE_SPEC_TEST=1
|
||||
|
||||
Reference in New Issue
Block a user