mirror of
https://github.com/traviscross/mtr.git
synced 2024-09-21 18:37:10 +00:00
put ifdefs around IPV6 only part. Fixes #184
This commit is contained in:
parent
c4c4ef8e55
commit
7476ad564e
2
ui/net.c
2
ui/net.c
@ -528,11 +528,13 @@ static void net_find_local_address(void)
|
||||
to succeed.
|
||||
*/
|
||||
if (remotesockaddr->sa_family == AF_INET6) {
|
||||
#ifdef ENABLE_IPV6
|
||||
addr_length = sizeof(struct sockaddr_in6);
|
||||
|
||||
memcpy(&remote_sockaddr, rsa6, addr_length);
|
||||
remote6 = (struct sockaddr_in6 *)&remote_sockaddr;
|
||||
remote6->sin6_port = htons(1);
|
||||
#endif
|
||||
} else {
|
||||
addr_length = sizeof(struct sockaddr_in);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user