diff options
author | Viktor Szakats <commit@vsz.me> | 2022-10-18 18:27:59 +0000 |
---|---|---|
committer | Viktor Szakats <commit@vsz.me> | 2022-10-18 18:27:59 +0000 |
commit | 1c567f797bce0befce109bceac6cf751331ae43f (patch) | |
tree | e74fecdd0fda230a10889d38a512af6314365add /lib/hostip.c | |
parent | 05d23823d7ab7e29f333a58fc50709e9856b3487 (diff) | |
download | curl-1c567f797bce0befce109bceac6cf751331ae43f.tar.gz |
hostip: guard PF_INET6 use
Some platforms (e.g. Amiga OS) do not have `PF_INET6`. Adjust the code
for these.
```
hostip.c: In function 'fetch_addr':
hostip.c:308:12: error: 'PF_INET6' undeclared (first use in this function)
pf = PF_INET6;
^~~~~~~~
```
Regression from 1902e8fc511078fb5e26fc2b907b4cce77e1240d
Reviewed-by: Daniel Stenberg
Closes #9760
Diffstat (limited to 'lib/hostip.c')
-rw-r--r-- | lib/hostip.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index 0eb565a2e..941ecacf4 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -303,8 +303,10 @@ static struct Curl_dns_entry *fetch_addr(struct Curl_easy *data, bool found = false; struct Curl_addrinfo *addr = dns->addr; +#ifdef PF_INET6 if(data->conn->ip_version == CURL_IPRESOLVE_V6) pf = PF_INET6; +#endif while(addr) { if(addr->ai_family == pf) { |