From bcb4eec75471ab8a84331f8ada8683544e08f592 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Mon, 28 Mar 2016 01:03:39 -0400 Subject: identd: Fix ipv6 support on Windows --- src/common/server.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/common/server.c b/src/common/server.c index 5bf2706f..53b18d02 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -833,14 +833,14 @@ server_read_child (GIOChannel *source, GIOCondition condition, server *serv) } { - struct sockaddr addr; + struct sockaddr_storage addr; int addr_len = sizeof (addr); guint16 port; ircnet *net = serv->network; - if (!getsockname (serv->sok, &addr, &addr_len)) + if (!getsockname (serv->sok, (struct sockaddr *)&addr, &addr_len)) { - if (addr.sa_family == AF_INET) + if (addr.ss_family == AF_INET) port = ntohs(((struct sockaddr_in *)&addr)->sin_port); else port = ntohs(((struct sockaddr_in6 *)&addr)->sin6_port); -- cgit 1.4.1