summaryrefslogtreecommitdiff
path: root/toxcore/onion.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-02-14 20:51:55 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-02-14 20:51:55 +0000
commit35f13ef51dbf99c3d45d04f572e9e88795df7ae6 (patch)
tree8213605775c5f749fdabe683fbdea9106a6c32c1 /toxcore/onion.c
parent17a0b617f299c34563960bd4e9ed9a88e76ba92f (diff)
Get rid of the only GNU extension we used.
Diffstat (limited to 'toxcore/onion.c')
-rw-r--r--toxcore/onion.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/onion.c b/toxcore/onion.c
index ffe99c2d..48cc4d76 100644
--- a/toxcore/onion.c
+++ b/toxcore/onion.c
@@ -55,9 +55,9 @@ static void ip_pack(uint8_t *data, IP source)
55 55
56 if (source.family == TOX_AF_INET || source.family == TOX_TCP_INET) { 56 if (source.family == TOX_AF_INET || source.family == TOX_TCP_INET) {
57 memset(data + 1, 0, SIZE_IP6); 57 memset(data + 1, 0, SIZE_IP6);
58 memcpy(data + 1, source.ip4.uint8, SIZE_IP4); 58 memcpy(data + 1, source.ip.v4.uint8, SIZE_IP4);
59 } else { 59 } else {
60 memcpy(data + 1, source.ip6.uint8, SIZE_IP6); 60 memcpy(data + 1, source.ip.v6.uint8, SIZE_IP6);
61 } 61 }
62} 62}
63 63
@@ -71,9 +71,9 @@ static int ip_unpack(IP *target, const uint8_t *data, unsigned int data_size, bo
71 target->family = data[0]; 71 target->family = data[0];
72 72
73 if (target->family == TOX_AF_INET || target->family == TOX_TCP_INET) { 73 if (target->family == TOX_AF_INET || target->family == TOX_TCP_INET) {
74 memcpy(target->ip4.uint8, data + 1, SIZE_IP4); 74 memcpy(target->ip.v4.uint8, data + 1, SIZE_IP4);
75 } else { 75 } else {
76 memcpy(target->ip6.uint8, data + 1, SIZE_IP6); 76 memcpy(target->ip.v6.uint8, data + 1, SIZE_IP6);
77 } 77 }
78 78
79 bool valid = disable_family_check || 79 bool valid = disable_family_check ||