зеркало из https://github.com/github/putty.git
Fix a compile failure with NO_IPV6.
A user points out that buf[] in sk_tcp_peer_info is only used in the IPv6 branch of an ifdef, and is declared with a size of INET6_ADDRSTRLEN, which won't be defined in NO_IPV6 mode. So moving the definition inside another IPv6-only ifdef fixes the resulting build failure.
This commit is contained in:
Родитель
09b74971c7
Коммит
24a43404b4
|
@ -1761,9 +1761,9 @@ static char *sk_tcp_peer_info(Socket sock)
|
|||
struct sockaddr_in addr;
|
||||
#else
|
||||
struct sockaddr_storage addr;
|
||||
char buf[INET6_ADDRSTRLEN];
|
||||
#endif
|
||||
int addrlen = sizeof(addr);
|
||||
char buf[INET6_ADDRSTRLEN];
|
||||
|
||||
if (p_getpeername(s->s, (struct sockaddr *)&addr, &addrlen) < 0)
|
||||
return NULL;
|
||||
|
|
Загрузка…
Ссылка в новой задаче