mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08:00
edae6c66c7
`Curl_getaddrinfo_ex()` gets _defined_ with `HAVE_GETADDRINFO` set. But,
`hostip4.c` _used_ it with `HAVE_GETADDRINFO_THREADSAFE` set alone. It
meant a build with the latter, but without the former flag could result
in calling this function but not defining it, and failing to link.
Patch this by adding an extra check for `HAVE_GETATTRINFO` around the
call.
Before this patch, build systems prevented this condition. Now they
don't need to.
While here, simplify the related CMake logic on Windows by setting
`HAVE_GETADDRINFO_THREADSAFE` to the detection result of
`HAVE_GETADDRINFO`. This expresses the following intent clearer than
the previous patch and keeps the logic in a single block of code:
When we have `getaddrinfo()` on Windows, it's always threadsafe.
Follow-up to
|
||
---|---|---|
.. | ||
Platforms | ||
cmake_uninstall.cmake.in | ||
CMakeConfigurableFile.in | ||
curl-config.cmake.in | ||
CurlSymbolHiding.cmake | ||
CurlTests.c | ||
FindBearSSL.cmake | ||
FindBrotli.cmake | ||
FindCARES.cmake | ||
FindGSS.cmake | ||
FindLibPSL.cmake | ||
FindLibSSH2.cmake | ||
FindMbedTLS.cmake | ||
FindMSH3.cmake | ||
FindNGHTTP2.cmake | ||
FindNGHTTP3.cmake | ||
FindNGTCP2.cmake | ||
FindNSS.cmake | ||
FindQUICHE.cmake | ||
FindWolfSSL.cmake | ||
FindZstd.cmake | ||
Macros.cmake | ||
OtherTests.cmake | ||
Utilities.cmake |