mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
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:
parent
8390f3bf7e
commit
7dfbe5aa30
@ -1950,7 +1950,7 @@ g_socket_multicast_group_operation (GSocket *socket,
|
||||
else
|
||||
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,
|
||||
&mc_req_ipv6, sizeof (mc_req_ipv6));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user