Blame SOURCES/libvirt-util-remove-const-specifier-from-nlmsghdr-arg-to-virNetlinkDumpCallback.patch

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