Shanks0224 opened a new pull request, #22242: URL: https://github.com/apache/nuttx/pull/22242
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary Add the glibc compatible `getaddrinfo_a()`, `gai_suspend()`, `gai_cancel()` and `gai_error()`, under the new option `NETDB_GETADDRINFO_A` (depends on `CANCELLATION_POINTS` and `TLS_NCLEANUP > 3`). The option is the single condition for netdb.h, the build and libc.csv. `gai_suspend()` follows the glibc implementation (resolv/gai_suspend.c). Depends on #22182: only the last commit belongs to this PR. ## Impact New functions only. No impact on documentation or hardware. ## Testing Build host: Linux x86_64. `sim:nsh` with `NETDB_DNSCLIENT` (name server 127.0.0.1, which never answers), `CANCELLATION_POINTS`, `TLS_NCLEANUP=4`: - `GAI_WAIT` returns the right address; `gai_error()` is 0. - `gai_suspend()` while the request completes: 0. All requests already complete: `EAI_ALLDONE`. One complete and one in progress, 1 s timeout: `EAI_AGAIN` after 1 s. These match glibc. - `gai_cancel()` of a blocked request: `EAI_CANCELED`; 10 cancels leak no file descriptor and no heap. - `TLS_NCLEANUP=3` disables the option. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
