diff options
author | irungentoo <irungentoo@gmail.com> | 2014-06-07 22:56:52 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-06-07 22:56:52 -0400 |
commit | f2101a7d861a7072a9679c399819d595194258c9 (patch) | |
tree | a64f9f08245b9828d03b51ca859ac851194809ac /toxcore/LAN_discovery.c | |
parent | 99572e944a7c466304e45b755e40a8dbb7717b4b (diff) |
Toxcore closer to building correctly with gcc -std=c99.
Diffstat (limited to 'toxcore/LAN_discovery.c')
-rw-r--r-- | toxcore/LAN_discovery.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/LAN_discovery.c b/toxcore/LAN_discovery.c index 9d1f055e..2deeadfd 100644 --- a/toxcore/LAN_discovery.c +++ b/toxcore/LAN_discovery.c | |||
@@ -192,7 +192,7 @@ int LAN_ip(IP ip) | |||
192 | return 0; | 192 | return 0; |
193 | 193 | ||
194 | /* embedded IPv4-in-IPv6 */ | 194 | /* embedded IPv4-in-IPv6 */ |
195 | if (IN6_IS_ADDR_V4MAPPED(&ip.ip6.in6_addr)) { | 195 | if (IPV6_IPV4_IN_V6(ip.ip6)) { |
196 | IP ip4; | 196 | IP ip4; |
197 | ip4.family = AF_INET; | 197 | ip4.family = AF_INET; |
198 | ip4.ip4.uint32 = ip.ip6.uint32[3]; | 198 | ip4.ip4.uint32 = ip.ip6.uint32[3]; |
@@ -200,7 +200,7 @@ int LAN_ip(IP ip) | |||
200 | } | 200 | } |
201 | 201 | ||
202 | /* localhost in IPv6 (::1) */ | 202 | /* localhost in IPv6 (::1) */ |
203 | if (IN6_IS_ADDR_LOOPBACK(&ip.ip6.in6_addr)) | 203 | if (ip.ip6.uint64[0] == 0 && ip.ip6.uint32[2] == 0 && ip.ip6.uint32[3] == htonl(1)) |
204 | return 0; | 204 | return 0; |
205 | } | 205 | } |
206 | 206 | ||