Merge pull request #1099 from chrox/master

Fixed build with arm-linux-androideabi toolchain
This commit is contained in:
Pieter Hintjens 2014-06-22 12:17:35 +02:00
commit 883e95b22e
2 changed files with 3 additions and 3 deletions

View File

@ -136,10 +136,10 @@ int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_
}
if (is_src_)
memcpy (&source_address.ipv4.sin_addr,
&((sockaddr_in*) &ifr.ifr_addr)->sin_addr, sizeof in_addr);
&((sockaddr_in*) &ifr.ifr_addr)->sin_addr, sizeof (struct in_addr));
else
memcpy (&address.ipv4.sin_addr,
&((sockaddr_in*) &ifr.ifr_addr)->sin_addr, sizeof in_addr);
&((sockaddr_in*) &ifr.ifr_addr)->sin_addr, sizeof (struct in_addr));
return 0;
}

View File

@ -122,7 +122,7 @@ int main (void)
// Get the group and supplimental groups of the process owner
gid_t groups[100];
int ngroups = getgroups(100, groups);
assert (ngroups != -1);
assert (ngroups != -1 && ngroups != 0);
gid_t group = getgid(), supgroup = groups[0], notgroup = groups[ngroups - 1] + 1;
for (int i = 0; i < ngroups; i++) {
if (supgroup == group && group != groups[i])