wasm-micro-runtime/core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src
Marcin Kolny c505da7464
Update __wasi_sock_accept signature to match wasi_snapshot_preview1 (#1531)
The function was introduced to WASI about half a year ago after it already
existed in WAMR.

It caused problems with compiling `wasi_socket_ext.c` with the wasi-sdk
that already had this hostcall exported (wasi-sdk >= 15).

The approach we take is the following:
- we update WASI interface to be compatible with the wasi_snapshot_preview1
- compilation with `wasi_socket_ext.c` supports both wasi_sdk >= 15 and wasi_sdk < 15
  (although we intend to drop support for < 15 at one point of time)
- we override `accept()` from wasi-libc - we do that because `accept()` in `wasi-libc`
  doesn't support returning address (as it doesn't have `getpeername()` implemented),
  so `wasi_socket_ext.c` offers more functionality right now

Resolves #1167 and #1528.

[1] https://github.com/WebAssembly/WASI/blob/main/phases/snapshot/witx/wasi_snapshot_preview1.witx
2022-09-29 09:29:54 +08:00
..
LICENSE Enable AoT and wamr-sdk, and change arguments of call wasm API (#157) 2020-01-21 13:26:14 +08:00
locking.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
numeric_limits.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
posix.c Update __wasi_sock_accept signature to match wasi_snapshot_preview1 (#1531) 2022-09-29 09:29:54 +08:00
posix.h Merge dev/socket into main (#1393) 2022-09-22 21:46:14 +08:00
queue.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
random.c Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
random.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
README.md Rename "master" branch to "main" 2020-06-27 02:39:47 -07:00
refcount.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
rights.h Implement part of Berkeley Socket API for libc-wasi (#1036) 2022-03-10 15:13:38 +08:00
ssp_config.h esp-idf: Make esp-idf support Libc WASI (#1356) 2022-08-15 16:17:28 +08:00
str.c Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00
str.h Apply clang-format for core/iwasm compilation and libraries (#784) 2021-10-13 15:13:00 +08:00

This directory consists of selected files copied from the [src/libemulator] directory in the cloudabi-utils repository, with minor modifications, along with the accompanying LICENSE file from that repository.

The modifications are marked with WASMTIME_* preprocessor macros.

The files were copied at git revision 223dadc53248552db43e012c67ed08cf416a2b12 which is dated Tue Jun 25 17:22:07 2019 -0700 .