wolfssl: fix compiler error without IPv6

Reported-by: Joseph Chen
Fixes #8550
Closes #8552
This commit is contained in:
Daniel Stenberg 2022-03-07 08:40:47 +01:00
parent 6df30a0ec8
commit 471d5f44c5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -462,9 +462,9 @@ wolfssl_connect_step1(struct Curl_easy *data, struct connectdata *conn,
const char * const hostname = SSL_HOST_NAME();
size_t hostname_len = strlen(hostname);
if((hostname_len < USHRT_MAX) &&
(0 == Curl_inet_pton(AF_INET, hostname, &addr4)) &&
!Curl_inet_pton(AF_INET, hostname, &addr4)
#ifdef ENABLE_IPV6
(0 == Curl_inet_pton(AF_INET6, hostname, &addr6))
&& !Curl_inet_pton(AF_INET6, hostname, &addr6)
#endif
) {
size_t snilen;