summaryrefslogtreecommitdiff
path: root/src/dhcpv6.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2016-02-08 08:02:31 +0100
committerSteven Barth <steven@midlink.org>2016-02-08 08:02:31 +0100
commit7533a6243dc3ac5a747cf6ccbc4d0539dafd3e07 (patch)
tree71a6f9de328b89856ba0b58a8cfcca210c871798 /src/dhcpv6.c
parentec7f4701b348f5c4c3191ca83ecd8453c431c432 (diff)
parent7a3af454310e5cd8cded240aac4a1e2a7fd04569 (diff)
downloadodhcp6c-master.tar.gz
Merge pull request #45 from themiron/masterHEADmaster
Alignment cleanups
Diffstat (limited to 'src/dhcpv6.c')
-rw-r--r--src/dhcpv6.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/dhcpv6.c b/src/dhcpv6.c
index 3e128bc..5998b75 100644
--- a/src/dhcpv6.c
+++ b/src/dhcpv6.c
@@ -586,12 +586,14 @@ int dhcpv6_request(enum dhcpv6_msg type)
for (; len < 0 && (round_start < round_end);
round_start = odhcp6c_get_milli_time()) {
uint8_t buf[1536];
- uint8_t cmsg_buf[CMSG_SPACE(sizeof(struct in6_pktinfo))]
- __aligned(__alignof__(struct cmsghdr));
+ union {
+ struct cmsghdr hdr;
+ uint8_t buf[CMSG_SPACE(sizeof(struct in6_pktinfo))];
+ } cmsg_buf;
struct iovec iov = {buf, sizeof(buf)};
struct sockaddr_in6 addr;
struct msghdr msg = {.msg_name = &addr, .msg_namelen = sizeof(addr),
- .msg_iov = &iov, .msg_iovlen = 1, .msg_control = cmsg_buf,
+ .msg_iov = &iov, .msg_iovlen = 1, .msg_control = cmsg_buf.buf,
.msg_controllen = sizeof(cmsg_buf)};
struct in6_pktinfo *pktinfo = NULL;