Browse code

core: fix build on Darwin

Author: Alfred Heggestad <aeh@db.org>
Committer: Andrei Pelinescu-Onciul <andrei@iptel.org>

Andrei Pelinescu-Onciul authored on 16/12/2008 14:34:04
Showing 2 changed files
... ...
@@ -190,7 +190,7 @@ int is_mcast(struct ip_addr* ip)
190 190
 		return IN_MULTICAST(htonl(ip->u.addr32[0]));
191 191
 #ifdef USE_IPV6
192 192
 	} else if (ip->af==AF_INET6){
193
-		return IN6_IS_ADDR_MULTICAST(&ip->u.addr32[0]);
193
+		return IN6_IS_ADDR_MULTICAST((struct in6_addr*)ip->u.addr32);
194 194
 #endif /* USE_IPV6 */
195 195
 	} else {
196 196
 		LOG(L_ERR, "ERROR: is_mcast: Unsupported protocol family\n");
... ...
@@ -242,7 +242,7 @@ inline static int ip_addr_loopback(struct ip_addr* ip)
242 242
 		return ip->u.addr32[0]==htonl(INADDR_LOOPBACK);
243 243
 #ifdef USE_IPV6
244 244
 	else if (ip->af==AF_INET6)
245
-		return IN6_IS_ADDR_LOOPBACK(&ip->u.addr32[0]);
245
+		return IN6_IS_ADDR_LOOPBACK((struct in6_addr*)ip->u.addr32);
246 246
 #endif /* USE_IPV6 */
247 247
 	return 0;
248 248
 }