gsocket: Use alternate IPv6 multicast group sockopt names

Apparently IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP are more portable than
IPV6_ADD_MEMBERSHIP and IPV6_DROP_MEMBERSHIP. (Windows and Linux have
both, but OS X only has the latter.)
This commit is contained in:
Dan Winship 2012-01-16 17:15:06 -05:00
parent 8390f3bf7e
commit 7dfbe5aa30

View File

@ -1950,7 +1950,7 @@ g_socket_multicast_group_operation (GSocket *socket,
else else
mc_req_ipv6.ipv6mr_interface = 0; mc_req_ipv6.ipv6mr_interface = 0;
optname = join_group ? IPV6_ADD_MEMBERSHIP : IPV6_DROP_MEMBERSHIP; optname = join_group ? IPV6_JOIN_GROUP : IPV6_LEAVE_GROUP;
result = setsockopt (socket->priv->fd, IPPROTO_IPV6, optname, result = setsockopt (socket->priv->fd, IPPROTO_IPV6, optname,
&mc_req_ipv6, sizeof (mc_req_ipv6)); &mc_req_ipv6, sizeof (mc_req_ipv6));
} }