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 |
||
---|---|---|
.circleci | ||
.github | ||
CMake | ||
docs | ||
include | ||
lib | ||
LICENSES | ||
m4 | ||
packages | ||
plan9 | ||
projects | ||
scripts | ||
src | ||
tests | ||
winbuild | ||
.dir-locals.el | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
acinclude.m4 | ||
appveyor.sh | ||
appveyor.yml | ||
buildconf | ||
buildconf.bat | ||
CHANGES.md | ||
CMakeLists.txt | ||
configure.ac | ||
COPYING | ||
curl-config.in | ||
Dockerfile | ||
GIT-INFO.md | ||
libcurl.pc.in | ||
Makefile.am | ||
Makefile.dist | ||
README | ||
README.md | ||
RELEASE-NOTES | ||
renovate.json | ||
REUSE.toml | ||
SECURITY.md |
Curl is a command-line tool for transferring data specified with URL syntax. Learn how to use curl by reading the manpage or everything curl.
Find out how to install curl by reading the INSTALL document.
libcurl is the library curl is using to do its job. It is readily available to be used by your software. Read the libcurl manpage to learn how.
Open Source
curl is Open Source and is distributed under an MIT-like license.
Contact
Contact us on a suitable mailing list or use GitHub issues/ pull requests/ discussions.
All contributors to the project are listed in the THANKS document.
Commercial support
For commercial support, maybe private and dedicated help with your problems or applications using (lib)curl visit the support page.
Website
Visit the curl website for the latest news and downloads.
Source code
Download the latest source from the Git server:
git clone https://github.com/curl/curl.git
Security problems
Report suspected security problems via our HackerOne page and not in public.
Notice
Curl contains pieces of source code that is Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan. This notice is included here to comply with the distribution terms.
Backers
Thank you to all our backers 🙏 Become a backer.
Sponsors
Support this project by becoming a sponsor.