lib: build fixups when built with most things disabled

Closes #11687
This commit is contained in:
Daniel Stenberg 2023-08-17 14:18:06 +02:00
parent 793157c51b
commit acca40c9b5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 63 additions and 28 deletions

View file

@ -121,19 +121,6 @@
static void freednsentry(void *freethis);
/*
* Return # of addresses in a Curl_addrinfo struct
*/
static int num_addresses(const struct Curl_addrinfo *addr)
{
int i = 0;
while(addr) {
addr = addr->ai_next;
i++;
}
return i;
}
/*
* Curl_printable_address() stores a printable version of the 1st address
* given in the 'ai' argument. The result will be stored in the buf that is
@ -388,6 +375,19 @@ Curl_fetch_addr(struct Curl_easy *data,
}
#ifndef CURL_DISABLE_SHUFFLE_DNS
/*
* Return # of addresses in a Curl_addrinfo struct
*/
static int num_addresses(const struct Curl_addrinfo *addr)
{
int i = 0;
while(addr) {
addr = addr->ai_next;
i++;
}
return i;
}
UNITTEST CURLcode Curl_shuffle_addr(struct Curl_easy *data,
struct Curl_addrinfo **addr);
/*