aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriadne Conill <ariadne@dereferenced.org>2020-07-04 23:41:53 -0600
committerRob Landley <rob@landley.net>2020-07-05 04:00:05 -0500
commit089e360ff11cce0f3355c1ff1420e0387c5c8745 (patch)
treea8d546fd2c3895617b543a5da5c4c54bbbf2e12f
parentc0dca293c1301a6315684703706597db07a8dbe1 (diff)
downloadtoybox-089e360ff11cce0f3355c1ff1420e0387c5c8745.tar.gz
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 <ariadne@dereferenced.org>
-rw-r--r--toys/pending/dhcp6.c2
1 files changed, 1 insertions, 1 deletions
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);
}