From 089e360ff11cce0f3355c1ff1420e0387c5c8745 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sat, 4 Jul 2020 23:41:53 -0600 Subject: dhcp6: use portable s6_addr instead of linux kernel-specific __in6_u.__u6_addr8 The glibc headers also provide that member, but s6_addr is the portable way. This fixes compilation on musl libc. Signed-off-by: Ariadne Conill --- toys/pending/dhcp6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/pending/dhcp6.c') diff --git a/toys/pending/dhcp6.c b/toys/pending/dhcp6.c index 728dc7d1..12d11553 100644 --- a/toys/pending/dhcp6.c +++ b/toys/pending/dhcp6.c @@ -377,7 +377,7 @@ static void parse_ia_na(uint8_t *data, int data_length) if(!getaddrinfo(TT.req_ip, NULL, NULL,&res)) { dbg("Requesting IP: %s\n", TT.req_ip); memcpy (&TT.input_socket6, res->ai_addr, res->ai_addrlen); - memcpy(t+4, TT.input_socket6.sin6_addr.__in6_u.__u6_addr8, 16); + memcpy(t+4, TT.input_socket6.sin6_addr.s6_addr, 16); } else xprintf("Invalid IP: %s\n",TT.req_ip); freeaddrinfo(res); } -- cgit v1.2.3