diff options
author | John-Mark Bell <[email protected]> | 2010-03-23 11:40:44 +0000 |
---|---|---|
committer | John-Mark Bell <[email protected]> | 2010-03-23 11:40:44 +0000 |
commit | b39b8b7f41b3420c77757845f66e2c567e1c5b40 (patch) | |
tree | fd7c57ee260f28f53c8fbc37f931c6ef65e42db9 /erts/epmd/src/epmd_int.h | |
parent | 99101783758b3e4805284aaec16d34dc3597158e (diff) | |
download | otp-b39b8b7f41b3420c77757845f66e2c567e1c5b40.tar.gz otp-b39b8b7f41b3420c77757845f66e2c567e1c5b40.tar.bz2 otp-b39b8b7f41b3420c77757845f66e2c567e1c5b40.zip |
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.
Diffstat (limited to 'erts/epmd/src/epmd_int.h')
-rw-r--r-- | erts/epmd/src/epmd_int.h | 12 |
1 files changed, 2 insertions, 10 deletions
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) |