about summary refs log tree commit diff
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-06-18 17:27:14 +0200
committeroy <Tom_Adams@web.de>2011-06-18 17:27:14 +0200
commit601509fe8afc2962e2b74b39fcfcee40b84ebfa8 (patch)
tree3fe346b2206d4e2f811244dcb275064e26b5c5f8
parent4dc79a9ec1209d9ec6265408b4fa419d052716ed (diff)
downloadzcatch-601509fe8afc2962e2b74b39fcfcee40b84ebfa8.tar.gz
zcatch-601509fe8afc2962e2b74b39fcfcee40b84ebfa8.zip
fixed compiler error on older windows sdk's. Closes #627
-rw-r--r--src/base/system.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/base/system.c b/src/base/system.c
index 790cfef4..01f0b398 100644
--- a/src/base/system.c
+++ b/src/base/system.c
@@ -835,11 +835,13 @@ static int priv_net_create_socket(int domain, int type, struct sockaddr *addr, i
 	}
 
 	/* set to IPv6 only if thats what we are creating */
+#if defined(IPV6_V6ONLY)	/* windows sdk 6.1 and higher */
 	if(domain == AF_INET6)
 	{
 		int ipv6only = 1;
 		setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&ipv6only, sizeof(ipv6only));
 	}
+#endif
 
 	/* bind the socket */
 	e = bind(sock, addr, sockaddrlen);