On Tue, Oct 27, 2026 at 03:24:45PM -0400, Stefan Hajnoczi wrote:
On Thu, Oct 22, 2026 at 03:47:26PM +0200, Tim Pambor wrote:
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 6e05c995f1..788913953d 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -33,7 +33,13 @@
 #include "standard-headers/linux/virtio_ring.h"
 #include "hw/virtio/vhost.h"
 #include "hw/virtio/virtio-bus.h"
+#if defined(__linux__)
 #include "linux-headers/linux/vhost.h"
+#endif
+
+#ifndef VHOST_FILE_UNBIND
+#define VHOST_FILE_UNBIND -1
+#endif

This constant is for hw/virtio/vhost.c's vhost_net_set_backend() API. It
should be defined along with that API. Define it alongside
vhost_net_set_backend() in hw/virtio/vhost.h and call it
VHOST_NET_FILE_UNBIND?


That constant is defined by a Linux header (see linux-headers/linux/vhost.h). Are you suggesting to add another constant that is defined with VHOST_FILE_UNBIND on Linux and -1 on other platforms?

Thanks,
Stefano


Reply via email to