From 43b609d41cd24435eccf6ead89f12fff888915f4 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sun, 15 Sep 2013 09:35:46 -0400 Subject: [PATCH] Fixed merge problems. --- toxcore/network.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/toxcore/network.c b/toxcore/network.c index da826a7f..1abe4784 100644 --- a/toxcore/network.c +++ b/toxcore/network.c @@ -502,6 +502,7 @@ int ip_equal(IP *a, IP *b) return 0; #ifdef TOX_ENABLE_IPV6 + /* same family */ if (a->family == b->family) { if (a->family == AF_INET) @@ -515,10 +516,10 @@ int ip_equal(IP *a, IP *b) /* different family: check on the IPv6 one if it is the IPv4 one embedded */ if ((a->family == AF_INET) && (b->family == AF_INET6)) { if (IN6_IS_ADDR_V4COMPAT(&b->ip6)) - return (a->ip4.in_addr.s_addr == b->ip6.s6_addr32[3]); + return (a->ip4.in_addr.s_addr == b->ip6.uint32[3]); } else if ((a->family == AF_INET6) && (b->family == AF_INET)) { if (IN6_IS_ADDR_V4COMPAT(&a->ip6)) - return (a->ip6.s6_addr32[3] == b->ip4.in_addr.s_addr); + return (a->ip6.uint32[3] == b->ip4.in_addr.s_addr); } return 0; @@ -776,6 +777,7 @@ int addr_resolve(const char *address, IP *to, IP *extra) ip4.in_addr = addr->sin_addr; rc |= 1; } + #endif break; /* switch */ #ifdef TOX_ENABLE_IPV6