From: Ian Jackson Date: Thu, 24 Jul 2008 12:57:10 +0000 (+0100) Subject: pass-through.h: Sprinkle some #ifdefs to cope with pciutils-dev versions X-Git-Tag: xen-3.3.0-rc1~2 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=cf5b00e6b714eb5f900d55471d85956b09cb8fd9;p=qemu-xen-4.0-testing.git 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 --- 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 */