connect: fix builds without AF_INET6
Regression from 2b309560c1
Reviewed-by: Daniel Stenberg
Reviewed-by: Jay Satiro
Closes #9770
This commit is contained in:
Родитель
1943fe14be
Коммит
3dc8f6f255
|
@ -1197,6 +1197,7 @@ static CURLcode singleipconnect(struct Curl_easy *data,
|
||||||
#ifdef TCP_FASTOPEN_CONNECT
|
#ifdef TCP_FASTOPEN_CONNECT
|
||||||
int optval = 1;
|
int optval = 1;
|
||||||
#endif
|
#endif
|
||||||
|
const char *ipmsg;
|
||||||
char buffer[STRERROR_LEN];
|
char buffer[STRERROR_LEN];
|
||||||
curl_socket_t *sockp = &conn->tempsock[tempindex];
|
curl_socket_t *sockp = &conn->tempsock[tempindex];
|
||||||
*sockp = CURL_SOCKET_BAD;
|
*sockp = CURL_SOCKET_BAD;
|
||||||
|
@ -1214,11 +1215,13 @@ static CURLcode singleipconnect(struct Curl_easy *data,
|
||||||
Curl_closesocket(data, conn, sockfd);
|
Curl_closesocket(data, conn, sockfd);
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
infof(data, " Trying %s%s%s:%d...",
|
#ifdef ENABLE_IPV6
|
||||||
(addr.family == AF_INET6 ? "[" : ""),
|
if(addr.family == AF_INET6)
|
||||||
ipaddress,
|
ipmsg = " Trying [%s]:%d...";
|
||||||
(addr.family == AF_INET6 ? "]" : ""),
|
else
|
||||||
port);
|
#endif
|
||||||
|
ipmsg = " Trying %s:%d...";
|
||||||
|
infof(data, ipmsg, ipaddress, port);
|
||||||
|
|
||||||
#ifdef ENABLE_IPV6
|
#ifdef ENABLE_IPV6
|
||||||
is_tcp = (addr.family == AF_INET || addr.family == AF_INET6) &&
|
is_tcp = (addr.family == AF_INET || addr.family == AF_INET6) &&
|
||||||
|
|
Загрузка…
Ссылка в новой задаче