mirror of
https://github.com/TokTok/c-toxcore
synced 2026-06-04 23:21:48 +00:00
Merge branch 'master' of https://github.com/notsecure/toxcore
This commit is contained in:
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user