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:
@ -510,7 +510,7 @@ handle_cmd_set_log_level(uint64 *args, uint32 argc)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef SGX_DISABLE_WASI
|
||||
#if WASM_ENABLE_LIBC_WASI != 0
|
||||
static void
|
||||
handle_cmd_set_wasi_args(uint64 *args, int32 argc)
|
||||
{
|
||||
@ -637,7 +637,7 @@ handle_cmd_set_wasi_args(uint64 *args, int32 argc)
|
||||
{
|
||||
*args = true;
|
||||
}
|
||||
#endif /* end of SGX_DISABLE_WASI */
|
||||
#endif /* end of WASM_ENABLE_LIBC_WASI != 0 */
|
||||
|
||||
static void
|
||||
handle_cmd_get_version(uint64 *args, uint32 argc)
|
||||
|
||||
Reference in New Issue
Block a user