wasm-micro-runtime/core/shared/platform/common/posix
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
..
platform_api_posix.cmake Fix posix build when libc wasi is disabled and debug interp is enabled (#3503) 2024-06-06 09:37:28 +08:00
posix_blocking_op.c Remove a lot of "unused parameter" warnings (#3075) 2024-01-24 11:21:13 +08:00
posix_clock.c Remove a lot of "unused parameter" warnings (#3075) 2024-01-24 11:21:13 +08:00
posix_file.c initialize WASI stdio handles to invalid for better error handling (#4092) 2025-05-08 08:47:07 +08:00
posix_malloc.c Add bh_print_proc_mem() to dump memory info of current process (#1734) 2022-11-25 08:33:44 +08:00
posix_memmap.c cr suggestions 2025-02-24 21:20:07 +00:00
posix_sleep.c Implement os_usleep for posix (#2517) 2023-09-01 12:10:54 +08:00
posix_socket.c posix os_socket_addr_resolve: relax compatibility check (#4469) 2025-07-14 13:06:40 +08:00
posix_thread.c fix: correct typos and improve comments across multiple files by codespell (#4116) 2025-03-07 08:21:54 +08:00
posix_time.c Enhancements on wasm function execution time statistic (#2985) 2024-01-17 09:51:54 +08:00
SConscript Support more features for rt-thread (#3661) 2024-07-26 10:34:15 +08:00