libcollectdclient: Use IPV6_JOIN_GROUP instead of IPV6_ADD_MEMBERSHIP.
authorFlorian Forster <octo@collectd.org>
Fri, 5 May 2017 13:17:16 +0000 (15:17 +0200)
committerFlorian Forster <octo@collectd.org>
Fri, 5 May 2017 13:17:16 +0000 (15:17 +0200)
IPV6_JOIN_GROUP appears to be more portable.

src/libcollectdclient/server.c

index dfe08de..6443506 100644 (file)
@@ -109,7 +109,7 @@ static int server_multicast_join(lcc_listener_t *srv,
     };
     memmove(&mreq6.ipv6mr_multiaddr, &sa->sin6_addr, sizeof(struct in6_addr));
 
-    status = setsockopt(srv->conn, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &mreq6,
+    status = setsockopt(srv->conn, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq6,
                         sizeof(mreq6));
     if (status == -1)
       return errno;