[PATCH] domain_interface: Fix build on FreeBSD

Michal Privoznik posted 1 patch 2 weeks, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/ece476ec2e0ff85ce342fb1b0b691f37e88553b7.1713164745.git.mprivozn@redhat.com
src/hypervisor/domain_interface.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
[PATCH] domain_interface: Fix build on FreeBSD
Posted by Michal Privoznik 2 weeks, 3 days ago
In one of my recent commits I've chopped just too much and moved
a variable declaration into a function not realizing it's still
used on FreeBSD. Bring it back but only for the FreeBSD case.

Fixes: f8b5bd855f8312457fd9ad8a68fb044982bd3cc6
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---

Pushed as build breaker fix.

 src/hypervisor/domain_interface.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/hypervisor/domain_interface.c b/src/hypervisor/domain_interface.c
index cc6aa8551a..756abb08e9 100644
--- a/src/hypervisor/domain_interface.c
+++ b/src/hypervisor/domain_interface.c
@@ -434,11 +434,14 @@ virDomainInterfaceDeleteDevice(virDomainDef *def,
         }
         break;
     case VIR_DOMAIN_NET_TYPE_BRIDGE:
-    case VIR_DOMAIN_NET_TYPE_NETWORK:
+    case VIR_DOMAIN_NET_TYPE_NETWORK: {
 #ifdef VIR_NETDEV_TAP_REQUIRE_MANUAL_CLEANUP
+        const virNetDevVPortProfile *vport = virDomainNetGetActualVirtPortProfile(net);
+
         if (!(vport && vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH))
             ignore_value(virNetDevTapDelete(net->ifname, net->backend.tap));
 #endif
+        }
         break;
     case VIR_DOMAIN_NET_TYPE_USER:
     case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
-- 
2.43.2
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org