diff options
Diffstat (limited to 'toxcore/network.c')
-rw-r--r-- | toxcore/network.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/toxcore/network.c b/toxcore/network.c index 49e1726c..af9e8cdd 100644 --- a/toxcore/network.c +++ b/toxcore/network.c | |||
@@ -28,6 +28,10 @@ | |||
28 | #include "network.h" | 28 | #include "network.h" |
29 | #include "util.h" | 29 | #include "util.h" |
30 | 30 | ||
31 | #ifndef IPV6_V6ONLY | ||
32 | #define IPV6_V6ONLY 27 | ||
33 | #endif | ||
34 | |||
31 | /* return current UNIX time in microseconds (us). */ | 35 | /* return current UNIX time in microseconds (us). */ |
32 | uint64_t current_time(void) | 36 | uint64_t current_time(void) |
33 | { | 37 | { |
@@ -407,7 +411,7 @@ Networking_Core *new_networking(IP ip, uint16_t port) | |||
407 | #ifdef LOGGING | 411 | #ifdef LOGGING |
408 | res = | 412 | res = |
409 | #endif | 413 | #endif |
410 | setsockopt(temp->sock, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); | 414 | setsockopt(temp->sock, IPPROTO_IPV6, IPV6_ADD_MEMBERSHIP, (char*)&mreq, sizeof(mreq)); |
411 | #ifdef LOGGING | 415 | #ifdef LOGGING |
412 | 416 | ||
413 | if (res < 0) { | 417 | if (res < 0) { |