summaryrefslogtreecommitdiff
path: root/sysdep/linux/netlink.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2016-05-12 17:49:12 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2016-05-12 18:03:23 +0200
commitaf678af0d5c9ef3d8afdc0789b33dd0c40b6d6e5 (patch)
tree4d786cd3fecdbb370f1ceee5daecd3aa62fc205b /sysdep/linux/netlink.c
parent286e2011d22ea6914d5f2db5de3f11911a1fb663 (diff)
parent8e433d6a529a883d566dc1d5a4afe0f1e2750baf (diff)
Merge remote-tracking branch 'origin/master' into int-new
Diffstat (limited to 'sysdep/linux/netlink.c')
-rw-r--r--sysdep/linux/netlink.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c
index 8166d5f5..8146072b 100644
--- a/sysdep/linux/netlink.c
+++ b/sysdep/linux/netlink.c
@@ -126,7 +126,12 @@ nl_get_reply(struct nl_sock *nl)
{
struct iovec iov = { nl->rx_buffer, NL_RX_SIZE };
struct sockaddr_nl sa;
- struct msghdr m = { (struct sockaddr *) &sa, sizeof(sa), &iov, 1, NULL, 0, 0 };
+ struct msghdr m = {
+ .msg_name = &sa,
+ .msg_namelen = sizeof(sa),
+ .msg_iov = &iov,
+ .msg_iovlen = 1,
+ };
int x = recvmsg(nl->fd, &m, 0);
if (x < 0)
die("nl_get_reply: %m");
@@ -1343,7 +1348,12 @@ nl_async_hook(sock *sk, int size UNUSED)
{
struct iovec iov = { nl_async_rx_buffer, NL_RX_SIZE };
struct sockaddr_nl sa;
- struct msghdr m = { (struct sockaddr *) &sa, sizeof(sa), &iov, 1, NULL, 0, 0 };
+ struct msghdr m = {
+ .msg_name = &sa,
+ .msg_namelen = sizeof(sa),
+ .msg_iov = &iov,
+ .msg_iovlen = 1,
+ };
struct nlmsghdr *h;
int x;
uint len;