diff options
author | Christian Pointner <equinox@anytun.org> | 2008-04-16 00:01:29 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2008-04-16 00:01:29 +0000 |
commit | cec3b44ad7c4f03d7ee8fcd9d35eca083f5d1fe4 (patch) | |
tree | 8a11d9c3af478f7d77828578fbffba356049a56f /src/networkPrefix.cpp | |
parent | makefile (diff) |
anytun-nosync builds on OpenBSD now
Diffstat (limited to 'src/networkPrefix.cpp')
-rw-r--r-- | src/networkPrefix.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/networkPrefix.cpp b/src/networkPrefix.cpp index 4ab8f6d..0d5f6ee 100644 --- a/src/networkPrefix.cpp +++ b/src/networkPrefix.cpp @@ -57,7 +57,14 @@ void NetworkPrefix::setNetworkPrefixLength(uint8_t length ) } else if (network_address_type_==ipv6) { in6_addr v6addr; for(int i=0;i<4;i++) +#if defined(__GNUC__) && defined(__linux__) ipv6_address_.s6_addr32[i]=0xFFFFFFFF; +#elif defined(__GNUC__) && defined(__OpenBSD__) + ipv6_address_.__u6_addr.__u6_addr32[i]=0xFFFFFFFF; +#else + #error Target not supported +#endif + *this &= (NetworkAddress(v6addr)<<(128-length)); } else if (network_address_type_==ethernet) { //TODO |