remove pointer type warnings when building with mingw

This commit is contained in:
notsecure 2014-06-27 07:38:36 -04:00
parent 0d98869f3c
commit 1f5496e43b

View File

@ -181,13 +181,13 @@ int set_socket_dualstack(sock_t sock)
{
int ipv6only = 0;
socklen_t optsize = sizeof(ipv6only);
int res = getsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &ipv6only, &optsize);
int res = getsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&ipv6only, &optsize);
if ((res == 0) && (ipv6only == 0))
return 1;
ipv6only = 0;
return (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &ipv6only, sizeof(ipv6only)) == 0);
return (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&ipv6only, sizeof(ipv6only)) == 0);
}