diff options
author | irungentoo <irungentoo@gmail.com> | 2013-09-20 16:27:24 -0700 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-09-20 16:27:24 -0700 |
commit | 01ec9d6e7bd9be9328d13aa30009b1f7559d1471 (patch) | |
tree | 0c5f38a29552f1b653707d27b488a5dc5c3fd01d /toxcore/network.c | |
parent | 20b6900fb181f71eca4577a5f1e1f5f3ecd6a28b (diff) | |
parent | b9306d6d069b9e9b53fcd392e3d1b4f357a8cbcc (diff) |
Merge pull request #593 from BtbN/win_fixes
Fix compilation on windows for ipv6 code
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) { |