Skip to content

Commit

Permalink
Fix initializer for struct in6_addr on AIX
Browse files Browse the repository at this point in the history
  • Loading branch information
bonsaiviking committed Sep 9, 2014
1 parent 48dfb44 commit e6659f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TargetGroup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,13 @@ static void ipv6_or_mask(struct in6_addr *a, const struct in6_addr *mask, const
}

void NetBlockIPv6Netmask::apply_netmask(int bits) {
#ifdef _AIX
const struct in6_addr zeros = { { { 0x00, 0x00, 0x00, 0x00 } } };
const struct in6_addr ones = { { { 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff } } };
#else
const struct in6_addr zeros = { { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} } };
const struct in6_addr ones = { { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} } };
#endif
struct in6_addr mask;

if (bits > 128)
Expand Down

0 comments on commit e6659f1

Please sign in to comment.