mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-05-28 15:24:49 -05:00
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:
parent
09b74971c7
commit
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user