wasm-micro-runtime/core/shared/platform
YAMAMOTO Takashi 2c4a660c4c
posix os_socket_addr_resolve: relax compatibility check (#4469)
some getaddrinfo implementations sometimes return results with
ai_protocol=0.

cf. https://github.com/apache/nuttx/issues/16693

standard-wise, i couldn't find anything about ai_protocol in
susv4-2018 except the following text:

> The fields ai_family, ai_socktype, and ai_protocol shall be usable
> as the arguments to the socket() function to create a socket suitable
> for use with the returned address.

because ai_protocol is usually merely used to feed socket() and
socket() usually accepts 0, it's probably standard-wise ok for
getaddrinfo to return ai_protocol=0.
the major implementations of getaddrinfo (eg. kame) seem to return
specific values like ai_protocol=IPPROTO_TCP though.

anyway, for the purpose of this function, there is little point to
be strict on the host getaddrinfo behavior. this commit just relaxes
the check to be friendly to those getaddrinfo implementations.
2025-07-14 13:06:40 +08:00
..
alios initialize WASI stdio handles to invalid for better error handling (#4092) 2025-05-08 08:47:07 +08:00
android Fix compiler warnings (#3784) 2024-09-11 08:59:16 +08:00
common posix os_socket_addr_resolve: relax compatibility check (#4469) 2025-07-14 13:06:40 +08:00
cosmopolitan Fix compiler warnings (#3784) 2024-09-11 08:59:16 +08:00
darwin Fix compiler warnings (#3784) 2024-09-11 08:59:16 +08:00
ego Make a workaround for EGO when fstat returns NOT_SUPPORT (#1970) 2023-02-21 11:11:27 +08:00
esp-idf Collective fix for typos and minor bugs (#4369) 2025-06-17 09:26:00 +08:00
freebsd Fix compiler warnings (#3784) 2024-09-11 08:59:16 +08:00
include initialize WASI stdio handles to invalid for better error handling (#4092) 2025-05-08 08:47:07 +08:00
linux Fix compiler warnings (#3784) 2024-09-11 08:59:16 +08:00
linux-sgx fix: correct typos and improve comments across multiple files by codespell (#4116) 2025-03-07 08:21:54 +08:00
nuttx platform/nuttx: Fix dcache operation in os_dcache_flush (#4225) 2025-05-06 06:55:53 +08:00
riot initialize WASI stdio handles to invalid for better error handling (#4092) 2025-05-08 08:47:07 +08:00
rt-thread initialize WASI stdio handles to invalid for better error handling (#4092) 2025-05-08 08:47:07 +08:00
vxworks Fix compiler warnings (#3784) 2024-09-11 08:59:16 +08:00
windows initialize WASI stdio handles to invalid for better error handling (#4092) 2025-05-08 08:47:07 +08:00
zephyr initialize WASI stdio handles to invalid for better error handling (#4092) 2025-05-08 08:47:07 +08:00
README.md re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00

This folder contains the platform abstract layer for multiple platforms. To support a new platform, you can simply create a new folder here and implement all the APIs defined in include folder.

Refer to port_wamr.md for how to port WAMR to a target platform.