mirror of
https://github.com/curl/curl.git
synced 2026-05-13 21:46:21 +03:00
The gethostbyname(3) family was removed in POSIX-1.2008 in favor of getaddrinfo(3) introduced in POSIX-1.2001. Modern POSIX systems such as Sortix does not have gethostbyname nor the related definitions and structures. curl already only uses getaddrinfo(3) if available and thread safe, although there is mild breakage if the related gethostbyname definitions are missing. This change attempts to fix that breakage: Remove an unnecessary configure error if gethostbyname is missing since getaddrinfo is enough as a fallback. Rewrite Curl_ip2addr to not use struct hostent as it no longer is standardized and create the struct Curl_addrinfo directly. Only define the Curl_he2ai function on non-getaddrinfo systems where it is going to be used with struct hoestent. Revoke the fallback logic for when it's unknown whether getaddrinfo is thread safe. It doesn't appear to make any sense since h_errno is unrelated to getaddrinfo. The logic prevents new POSIX.1-2024 systems from passing the thread safety test since h_errno does not exist anymore and POSIX already requires getaddrinfo to be thread safe. There's already a denylist in place for operating systems with known buggy implementations. Closes #15475 |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| curl-amissl.m4 | ||
| curl-bearssl.m4 | ||
| curl-compilers.m4 | ||
| curl-confopts.m4 | ||
| curl-functions.m4 | ||
| curl-gnutls.m4 | ||
| curl-mbedtls.m4 | ||
| curl-openssl.m4 | ||
| curl-override.m4 | ||
| curl-reentrant.m4 | ||
| curl-rustls.m4 | ||
| curl-schannel.m4 | ||
| curl-sectransp.m4 | ||
| curl-sysconfig.m4 | ||
| curl-wolfssl.m4 | ||
| xc-am-iface.m4 | ||
| xc-cc-check.m4 | ||
| xc-lt-iface.m4 | ||
| xc-val-flgs.m4 | ||
| zz40-xc-ovr.m4 | ||
| zz50-xc-ovr.m4 | ||
| zz60-xc-ovr.m4 | ||