From: Felix Fietkau Date: Sun, 29 Mar 2015 02:35:17 +0000 (+0200) Subject: ra: use proper struct msghdr initializer to fix build error on musl X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0812d31deabe32918fd5b9498f0a8b2c2962d70b;p=project%2Fodhcp6c.git ra: use proper struct msghdr initializer to fix build error on musl Signed-off-by: Felix Fietkau --- diff --git a/src/ra.c b/src/ra.c index 90f0923..9541624 100644 --- a/src/ra.c +++ b/src/ra.c @@ -271,8 +271,15 @@ bool ra_process(void) while (true) { struct sockaddr_in6 from; struct iovec iov = {buf, sizeof(buf)}; - struct msghdr msg = {&from, sizeof(from), &iov, 1, - cmsg_buf, sizeof(cmsg_buf), 0}; + struct msghdr msg = { + .msg_name = (void *) &from, + .msg_namelen = sizeof(from), + .msg_iov = &iov, + .msg_iovlen = 1, + .msg_control = cmsg_buf, + .msg_controllen = sizeof(cmsg_buf), + .msg_flags = 0 + }; ssize_t len = recvmsg(sock, &msg, MSG_DONTWAIT); if (len <= 0)