mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
remove pointer type warnings when building with mingw
This commit is contained in:
parent
0d98869f3c
commit
1f5496e43b
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user