Commit 883e95b2 authored by Pieter Hintjens's avatar Pieter Hintjens

Merge pull request #1099 from chrox/master

Fixed build with arm-linux-androideabi toolchain
parents 8b801972 bdf6427a
......@@ -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;
}
......
......@@ -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])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment