On 25/5/26 20:27, [email protected] wrote:
From: Quan Sun <[email protected]>

On build hosts with kernel headers older than 6.0, the system's
<linux/vhost_types.h> does not define struct vhost_vring_worker or
struct vhost_worker_state, causing compilation of vhost-scsi.c to
fail:

   error: storage size of 'vq_worker' isn't known

Fix by including standard-headers/linux/vhost_types.h before the
system's <linux/vhost.h>, matching the existing pattern used in
hw/virtio/vhost-backend.c. QEMU's bundled header provides the
struct definitions, and its include guard prevents redefinition
when the system header pulls in its own vhost_types.h.

Signed-off-by: Quan Sun <[email protected]>
---
  hw/scsi/vhost-scsi.c | 1 +
  1 file changed, 1 insertion(+)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

Reply via email to