summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2013-08-24 17:47:57 -0400
committerDan Winship <danw@gnome.org>2013-08-31 11:40:44 -0400
commitcde9f4598ba0e34d7c5fcbe4fcddaf67c15bd5e3 (patch)
tree496bfc74a740842e2c958f10d2bd9a48d77db108
parent02393e6faf409c0cae952e94ecbc2c8fad75a3ee (diff)
downloadglib-cde9f4598ba0e34d7c5fcbe4fcddaf67c15bd5e3.tar.gz
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.
-rw-r--r--gio/tests/socket.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gio/tests/socket.c b/gio/tests/socket.c
index 6b267b0e1..2e4072b9a 100644
--- a/gio/tests/socket.c
+++ b/gio/tests/socket.c
@@ -100,11 +100,7 @@ create_server (GSocketFamily family,
#if defined (IPPROTO_IPV6) && defined (IPV6_V6ONLY)
if (v4mapped)
{
- int fd, v6_only;
-
- fd = g_socket_get_fd (server);
- v6_only = 0;
- setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, &v6_only, sizeof (v6_only));
+ g_socket_set_option (data->server, IPPROTO_IPV6, IPV6_V6ONLY, FALSE, NULL);
if (! g_socket_speaks_ipv4 (data->server))
{
g_object_unref (data->server);