diff options
author | SUZUKI, Shinsuke <suz@kame.net> | 2006-12-04 15:18:39 +0000 |
---|---|---|
committer | Bjørn Mork <bjorn@mork.no> | 2010-08-06 15:37:36 +0200 |
commit | b73261b6f5f0dbb2c0fee2c52278dfbd0ee4aba3 (patch) | |
tree | 76254482d4374ed22b5785a9a70bd10045c390fd /common.c | |
parent | 11a1e58f11dfef67d01aebf89232f93f12207bc0 (diff) |
introduced a HAVE_SA_LEN macro to support OSes (other than linux) without length field in sockaddr_*
Diffstat (limited to 'common.c')
-rw-r--r-- | common.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -703,7 +703,7 @@ getifaddr(addr, ifnam, prefix, plen, strong, ignoreflags) if (ifa->ifa_addr->sa_family != AF_INET6) continue; -#ifndef __linux__ +#ifdef HAVE_SA_LEN if (ifa->ifa_addr->sa_len > sizeof(sin6)) continue; #endif @@ -868,7 +868,7 @@ sa6_plen2mask(sa6, plen) memset(sa6, 0, sizeof(*sa6)); sa6->sin6_family = AF_INET6; -#ifndef __linux__ +#ifdef HAVE_SA_LEN sa6->sin6_len = sizeof(*sa6); #endif @@ -905,7 +905,7 @@ in6addr2str(in6, scopeid) memset(&sa6, 0, sizeof(sa6)); sa6.sin6_family = AF_INET6; -#ifndef __linux__ +#ifdef HAVE_SA_LEN sa6.sin6_len = sizeof(sa6); #endif sa6.sin6_addr = *in6; |