Skip to content

Commit 44bee51

Browse files
conghuic23wenlingz
authored andcommitted
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: #2145 Signed-off-by: Conghui Chen <conghui.chen@intel.com> Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com> Acked-by: Yin Fengwei <fengwei.yin@intel.com>
1 parent 9fe282f commit 44bee51

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

devicemodel/include/virtio.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,14 @@ enum {
229229
#define VIRTIO_DEV_HDCP 0x8607
230230
#define VIRTIO_DEV_COREU 0x8608
231231

232+
/*
233+
* VIRTIO_CONFIG_S_NEEDS_RESET is not defined
234+
* in some environments's virtio_config.h
235+
*/
236+
#ifndef VIRTIO_CONFIG_S_NEEDS_RESET
237+
#define VIRTIO_CONFIG_S_NEEDS_RESET 0x40
238+
#endif
239+
232240
/*
233241
* Bits in VIRTIO_PCI_ISR. These apply only if not using MSI-X.
234242
*

0 commit comments

Comments
 (0)