summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 531bad3)
raw | patch | inline | side by side (parent: 531bad3)
author | trustchk <trustchk@users.noreply.github.com> | |
Thu, 2 Nov 2017 10:31:22 +0000 (10:31 +0000) | ||
committer | Florian Forster <octo@collectd.org> | |
Sun, 5 Nov 2017 05:25:25 +0000 (06:25 +0100) |
On both IBM AIX and Gentoo Linux, the struct `ip_mreq` does not define
the field `imr_address`, plus the compiler throws an error in the
assignment of `sa->s_addr`. With `ip_mreqn` present, the fallback path
for `ip_mreq` is not used and everything works. But AIX does not know
that struct and fails to compile.
the field `imr_address`, plus the compiler throws an error in the
assignment of `sa->s_addr`. With `ip_mreqn` present, the fallback path
for `ip_mreq` is not used and everything works. But AIX does not know
that struct and fails to compile.
src/libcollectdclient/server.c | patch | blob | history |
index d18cc7da1f0493435ad02d55467870604fd80ec0..a81afda8ab8b4370e9d97da9306edfa588ae4fb9 100644 (file)
};
#else
struct ip_mreq mreq = {
- .imr_address.s_addr = INADDR_ANY, .imr_multiaddr.s_addr = sa->s_addr,
+ .imr_multiaddr.s_addr = sa->sin_addr.s_addr,
};
#endif
status = setsockopt(srv->conn, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq,