[libvirt] [PATCH] util: fix build without macvtap

Roman Bogorodskiy bogorodskiy at gmail.com
Wed Jan 27 02:45:27 UTC 2016


Commit 370608b added new functions:

 - virNetDevMacVLanReleaseName,
 - virNetDevMacVLanReserveName.

Add stubbed versions of them to fix build without macvtap.
---
 src/util/virnetdevmacvlan.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/util/virnetdevmacvlan.c b/src/util/virnetdevmacvlan.c
index da71eef..9293510 100644
--- a/src/util/virnetdevmacvlan.c
+++ b/src/util/virnetdevmacvlan.c
@@ -1330,4 +1330,21 @@ int virNetDevMacVLanVPortProfileRegisterCallback(const char *ifname ATTRIBUTE_UN
                          _("Cannot create macvlan devices on this platform"));
     return -1;
 }
+
+int
+virNetDevMacVLanReserveName(const char *name ATTRIBUTE_UNUSED,
+                            bool quietFail ATTRIBUTE_UNUSED)
+{
+    virReportSystemError(ENOSYS, "%s",
+                         _("The macvlan devices are not supported on this platform"));
+    return -1;
+}
+
+int
+virNetDevMacVLanReleaseName(const char *name ATTRIBUTE_UNUSED)
+{
+    virReportSystemError(ENOSYS, "%s",
+                         _("The macvlan devices are not supported on this platform"));
+    return -1;
+}
 #endif /* ! WITH_MACVTAP */
-- 
2.4.6




More information about the libvir-list mailing list