From b990a79a9f4dc52452719bc99aa9f6caedafbf72 Mon Sep 17 00:00:00 2001 Message-Id: From: Laine Stump Date: Mon, 14 Jan 2019 11:35:02 -0500 Subject: [PATCH] util: remove const specifier from nlmsghdr arg to virNetlinkDumpCallback() This is problematic if a callback function wants to send the nlmsghdr to a library function that has no "const" in its prototype (e.g. nlmsg_find_attr()) Signed-off-by: Laine Stump Reviewed-by: Erik Skultety (cherry picked from commit 0ea259b6bf3c89bb3b144eba38bc0bd32e516107) https: //bugzilla.redhat.com/1583131 Reviewed-by: Jiri Denemark --- src/util/virnetdevip.c | 2 +- src/util/virnetlink.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index bf98ed8a59..1bfbd20034 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -540,7 +540,7 @@ struct virNetDevIPCheckIPv6ForwardingData { }; static int -virNetDevIPCheckIPv6ForwardingCallback(const struct nlmsghdr *resp, +virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghdr *resp, void *opaque) { struct rtmsg *rtmsg = NLMSG_DATA(resp); diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index 2a9de0a575..7ff88a5faf 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -52,7 +52,7 @@ int virNetlinkCommand(struct nl_msg *nl_msg, uint32_t src_pid, uint32_t dst_pid, unsigned int protocol, unsigned int groups); -typedef int (*virNetlinkDumpCallback)(const struct nlmsghdr *resp, +typedef int (*virNetlinkDumpCallback)(struct nlmsghdr *resp, void *data); int virNetlinkDumpCommand(struct nl_msg *nl_msg, -- 2.20.1