From cf5b00e6b714eb5f900d55471d85956b09cb8fd9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 24 Jul 2008 13:57:10 +0100 Subject: [PATCH] pass-through.h: Sprinkle some #ifdefs to cope with pciutils-dev versions Some versions of pciutils-dev contain #defines which others are lacking. To avoid spurious compiler warnings we add some #ifdefs. *sigh* Signed-off-by: Yuji Shimada --- hw/pass-through.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/pass-through.h b/hw/pass-through.h index 9acc4f3e..b32518f3 100644 --- a/hw/pass-through.h +++ b/hw/pass-through.h @@ -49,12 +49,20 @@ /* because the current version of libpci (2.2.0) doesn't define these ID, * so we define Capability ID here. */ +#ifndef PCI_CAP_ID_HOTPLUG /* SHPC Capability List Item reg group */ #define PCI_CAP_ID_HOTPLUG 0x0C +#endif + +#ifndef PCI_CAP_ID_SSVID /* Subsystem ID and Subsystem Vendor ID Capability List Item reg group */ #define PCI_CAP_ID_SSVID 0x0D +#endif + +#ifndef PCI_MSI_FLAGS_MASK_BIT /* interrupt masking & reporting supported */ #define PCI_MSI_FLAGS_MASK_BIT 0x0100 +#endif #define PT_INVALID_REG 0xFFFFFFFF /* invalid register value */ #define PT_BAR_ALLF 0xFFFFFFFF /* BAR ALLF value */ -- 2.39.5