mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-09 23:43:11 +02:00
gio/tests/socket: fix warning building on win32
setsockopt() has a broken prototype on win32. Fix this by just using g_socket_set_option() instead.
This commit is contained in:
parent
02393e6faf
commit
cde9f4598b
@ -100,11 +100,7 @@ create_server (GSocketFamily family,
|
|||||||
#if defined (IPPROTO_IPV6) && defined (IPV6_V6ONLY)
|
#if defined (IPPROTO_IPV6) && defined (IPV6_V6ONLY)
|
||||||
if (v4mapped)
|
if (v4mapped)
|
||||||
{
|
{
|
||||||
int fd, v6_only;
|
g_socket_set_option (data->server, IPPROTO_IPV6, IPV6_V6ONLY, FALSE, NULL);
|
||||||
|
|
||||||
fd = g_socket_get_fd (server);
|
|
||||||
v6_only = 0;
|
|
||||||
setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, &v6_only, sizeof (v6_only));
|
|
||||||
if (! g_socket_speaks_ipv4 (data->server))
|
if (! g_socket_speaks_ipv4 (data->server))
|
||||||
{
|
{
|
||||||
g_object_unref (data->server);
|
g_object_unref (data->server);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user