mirror of
https://github.com/zeromq/libzmq.git
synced 2025-11-08 06:42:57 +01:00
Fixed build with arm-linux-androideabi toolchain
This commit is contained in:
@@ -136,10 +136,10 @@ int zmq::tcp_address_t::resolve_nic_name (const char *nic_, bool ipv6_, bool is_
|
|||||||
}
|
}
|
||||||
if (is_src_)
|
if (is_src_)
|
||||||
memcpy (&source_address.ipv4.sin_addr,
|
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
|
else
|
||||||
memcpy (&address.ipv4.sin_addr,
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ int main (void)
|
|||||||
// Get the group and supplimental groups of the process owner
|
// Get the group and supplimental groups of the process owner
|
||||||
gid_t groups[100];
|
gid_t groups[100];
|
||||||
int ngroups = getgroups(100, groups);
|
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;
|
gid_t group = getgid(), supgroup = groups[0], notgroup = groups[ngroups - 1] + 1;
|
||||||
for (int i = 0; i < ngroups; i++) {
|
for (int i = 0; i < ngroups; i++) {
|
||||||
if (supgroup == group && group != groups[i])
|
if (supgroup == group && group != groups[i])
|
||||||
|
|||||||
Reference in New Issue
Block a user