mirror of
https://github.com/curl/curl.git
synced 2026-08-25 14:13:34 +03:00
lib: provide a getaddrinfo wrapper
This uses c-ares under the hood and supports the CURL_DNS_SERVER environment variable - for debug builds only. The getaddrinfo() replacement function is only used if CURL_DNS_SERVER is set to make a debug build work more like a release version without the variable set. 'override-dns' is a new feature for the test suite when curl can be told to use a dedicated DNS server, and test 2102 is the first to require this. Requires c-ares 1.26.0 or later. Closes #17134
This commit is contained in:
parent
da33c1e349
commit
e0ebc3ff13
8 changed files with 335 additions and 11 deletions
|
|
@ -35,6 +35,8 @@
|
|||
#include "multihandle.h" /* for ENABLE_WAKEUP */
|
||||
#include "tool_xattr.h" /* for USE_XATTR */
|
||||
#include "curl_sha512_256.h" /* for CURL_HAVE_SHA512_256 */
|
||||
#include "asyn.h" /* for CURLRES_ARES */
|
||||
#include "fake_addrinfo.h" /* for USE_FAKE_GETADDRINFO */
|
||||
#include <stdio.h>
|
||||
|
||||
static const char *disabled[]={
|
||||
|
|
@ -225,6 +227,14 @@ static const char *disabled[]={
|
|||
"OFF"
|
||||
#else
|
||||
"ON"
|
||||
#endif
|
||||
,
|
||||
"override-dns: "
|
||||
#if defined(CURLDEBUG) && \
|
||||
(defined(CURLRES_ARES) || defined(USE_FAKE_GETADDRINFO))
|
||||
"ON"
|
||||
#else
|
||||
"OFF"
|
||||
#endif
|
||||
,
|
||||
NULL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue