summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2016-03-28 01:03:39 -0400
committerPatrick Griffis <tingping@tingping.se>2016-03-28 01:28:56 -0400
commitbcb4eec75471ab8a84331f8ada8683544e08f592 (patch)
tree9c4b9e242d9299cce7c2231d2cdaceb089f24240
parent795e97f428b44ee91e6b262b76489eade89f176c (diff)
identd: Fix ipv6 support on Windows
-rw-r--r--src/common/server.c6
1 files changed, 3 insertions, 3 deletions
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);