diff options
Diffstat (limited to 'toxcore/network.c')
-rw-r--r-- | toxcore/network.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/network.c b/toxcore/network.c index d8ae7750..592f8e45 100644 --- a/toxcore/network.c +++ b/toxcore/network.c | |||
@@ -66,7 +66,7 @@ int sendpacket(unsigned int sock, IP_Port ip_port, uint8_t *data, uint32_t lengt | |||
66 | int sendpacket(int sock, IP_Port ip_port, uint8_t *data, uint32_t length) | 66 | int sendpacket(int sock, IP_Port ip_port, uint8_t *data, uint32_t length) |
67 | #endif | 67 | #endif |
68 | { | 68 | { |
69 | ADDR addr = {AF_INET, ip_port.port, ip_port.ip}; | 69 | ADDR addr = {AF_INET, ip_port.port, ip_port.ip, {0}}; |
70 | return sendto(sock, (char *) data, length, 0, (struct sockaddr *)&addr, sizeof(addr)); | 70 | return sendto(sock, (char *) data, length, 0, (struct sockaddr *)&addr, sizeof(addr)); |
71 | } | 71 | } |
72 | 72 | ||
@@ -215,7 +215,7 @@ Networking_Core *new_networking(IP ip, uint16_t port) | |||
215 | #endif | 215 | #endif |
216 | 216 | ||
217 | /* Bind our socket to port PORT and address 0.0.0.0 */ | 217 | /* Bind our socket to port PORT and address 0.0.0.0 */ |
218 | ADDR addr = {AF_INET, htons(port), ip}; | 218 | ADDR addr = {AF_INET, htons(port), ip, {0}}; |
219 | bind(temp->sock, (struct sockaddr *)&addr, sizeof(addr)); | 219 | bind(temp->sock, (struct sockaddr *)&addr, sizeof(addr)); |
220 | return temp; | 220 | return temp; |
221 | } | 221 | } |