From b39b8b7f41b3420c77757845f66e2c567e1c5b40 Mon Sep 17 00:00:00 2001 From: John-Mark Bell Date: Tue, 23 Mar 2010 11:40:44 +0000 Subject: Fix compilation of epmd with IPv6 enabled Modify IPv6 variants of SET_ADDR_LOOPBACK and SET_ADDR_ANY to use in6addr_loopback and in6addr_any. --- erts/epmd/src/epmd_int.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'erts/epmd/src') diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h index 65fcf9bacb..0e432e2cb0 100644 --- a/erts/epmd/src/epmd_int.h +++ b/erts/epmd/src/epmd_int.h @@ -192,26 +192,18 @@ #define FAMILY AF_INET6 #define SET_ADDR_LOOPBACK(addr, af, port) do { \ - static u_int32_t __addr[4] = IN6ADDR_LOOPBACK_INIT; \ memset((char*)&(addr), 0, sizeof(addr)); \ (addr).sin6_family = (af); \ (addr).sin6_flowinfo = 0; \ - (addr).sin6_addr.s6_addr32[0] = __addr[0]; \ - (addr).sin6_addr.s6_addr32[1] = __addr[1]; \ - (addr).sin6_addr.s6_addr32[2] = __addr[2]; \ - (addr).sin6_addr.s6_addr32[3] = __addr[3]; \ + (addr).sin6_addr = in6addr_loopback; \ (addr).sin6_port = htons(port); \ } while(0) #define SET_ADDR_ANY(addr, af, port) do { \ - static u_int32_t __addr[4] = IN6ADDR_ANY_INIT; \ memset((char*)&(addr), 0, sizeof(addr)); \ (addr).sin6_family = (af); \ (addr).sin6_flowinfo = 0; \ - (addr).sin6_addr.s6_addr32[0] = __addr[0]; \ - (addr).sin6_addr.s6_addr32[1] = __addr[1]; \ - (addr).sin6_addr.s6_addr32[2] = __addr[2]; \ - (addr).sin6_addr.s6_addr32[3] = __addr[3]; \ + (addr).sin6_addr = in6addr_any; \ (addr).sin6_port = htons(port); \ } while(0) -- cgit v1.2.3