From 5213a0d3a280ecf78238ffcba5a52cee29239e51 Mon Sep 17 00:00:00 2001 From: Conghui Chen Date: Sat, 22 Dec 2018 08:25:47 +0800 Subject: [PATCH] dm: virtio: fix compile issue on ubuntu As VIRTIO_CONFIG_S_NEEDS_RESET is not defined in standard virtio header file on ubuntu, there will be compile issue. so add VIRTIO_CONFIG_S_NEEDS_RESET to fix it. Tracked-On: #2219 Signed-off-by: Conghui Chen Reviewed-by: Jian Jun Chen Acked-by: Yin Fengwei --- devicemodel/include/virtio.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/devicemodel/include/virtio.h b/devicemodel/include/virtio.h index f13cbc22d..16b1a8a00 100644 --- a/devicemodel/include/virtio.h +++ b/devicemodel/include/virtio.h @@ -229,6 +229,14 @@ enum { #define VIRTIO_DEV_HDCP 0x8607 #define VIRTIO_DEV_COREU 0x8608 +/* + * VIRTIO_CONFIG_S_NEEDS_RESET is not defined + * in some environments's virtio_config.h + */ +#ifndef VIRTIO_CONFIG_S_NEEDS_RESET +#define VIRTIO_CONFIG_S_NEEDS_RESET 0x40 +#endif + /* * Bits in VIRTIO_PCI_ISR. These apply only if not using MSI-X. *