summaryrefslogtreecommitdiff
path: root/toxcore/network.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/network.c')
-rw-r--r--toxcore/network.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/network.c b/toxcore/network.c
index 1217238a..05b2ce2e 100644
--- a/toxcore/network.c
+++ b/toxcore/network.c
@@ -181,13 +181,13 @@ int set_socket_dualstack(sock_t sock)
181{ 181{
182 int ipv6only = 0; 182 int ipv6only = 0;
183 socklen_t optsize = sizeof(ipv6only); 183 socklen_t optsize = sizeof(ipv6only);
184 int res = getsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &ipv6only, &optsize); 184 int res = getsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&ipv6only, &optsize);
185 185
186 if ((res == 0) && (ipv6only == 0)) 186 if ((res == 0) && (ipv6only == 0))
187 return 1; 187 return 1;
188 188
189 ipv6only = 0; 189 ipv6only = 0;
190 return (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, &ipv6only, sizeof(ipv6only)) == 0); 190 return (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void*)&ipv6only, sizeof(ipv6only)) == 0);
191} 191}
192 192
193 193