diff --git a/include/hw/xen/interface/physdev.h b/include/hw/xen/interface/physdev.h index f0c0d4727c..ca2bcbfd15 100644 --- a/include/hw/xen/interface/physdev.h +++ b/include/hw/xen/interface/physdev.h @@ -283,7 +283,7 @@ struct physdev_pci_device_add { * First element ([0]) is PXM domain associated with the device (if * XEN_PCI_DEV_PXM is set) */ - uint32_t optarr[XEN_FLEX_ARRAY_DIM]; + uint32_t optarr[]; }; typedef struct physdev_pci_device_add physdev_pci_device_add_t; DEFINE_XEN_GUEST_HANDLE(physdev_pci_device_add_t); diff --git a/include/hw/xen/interface/version.h b/include/hw/xen/interface/version.h index 9c78b4f3b6..2f183c3efd 100644 --- a/include/hw/xen/interface/version.h +++ b/include/hw/xen/interface/version.h @@ -77,9 +77,8 @@ typedef char xen_commandline_t[1024]; */ #define XENVER_build_id 10 struct xen_build_id { - uint32_t len; /* IN: size of buf[]. */ - unsigned char buf[XEN_FLEX_ARRAY_DIM]; - /* OUT: Variable length buffer with build_id. */ + uint32_t len; /* IN: size of buf[]. */ + unsigned char buf[]; /* OUT: Variable length buffer with build_id. */ }; typedef struct xen_build_id xen_build_id_t; diff --git a/include/hw/xen/interface/xen-compat.h b/include/hw/xen/interface/xen-compat.h index 97fe698498..582c018236 100644 --- a/include/hw/xen/interface/xen-compat.h +++ b/include/hw/xen/interface/xen-compat.h @@ -24,6 +24,4 @@ #error "These header files do not support the requested interface version." #endif -#define COMPAT_FLEX_ARRAY_DIM XEN_FLEX_ARRAY_DIM - #endif /* __XEN_PUBLIC_XEN_COMPAT_H__ */ diff --git a/include/hw/xen/interface/xen.h b/include/hw/xen/interface/xen.h index 920567e006..a6f4aa6199 100644 --- a/include/hw/xen/interface/xen.h +++ b/include/hw/xen/interface/xen.h @@ -36,15 +36,6 @@ DEFINE_XEN_GUEST_HANDLE(uint64_t); DEFINE_XEN_GUEST_HANDLE(xen_pfn_t); DEFINE_XEN_GUEST_HANDLE(xen_ulong_t); -/* Define a variable length array (depends on compiler). */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -#define XEN_FLEX_ARRAY_DIM -#elif defined(__GNUC__) -#define XEN_FLEX_ARRAY_DIM 0 -#else -#define XEN_FLEX_ARRAY_DIM 1 /* variable size */ -#endif - /* Turn a plain number into a C unsigned (long (long)) constant. */ #define __xen_mk_uint(x) x ## U #define __xen_mk_ulong(x) x ## UL @@ -986,13 +977,8 @@ typedef struct { ((d) >> 8) & 0xFF, ((d) >> 0) & 0xFF, \ e1, e2, e3, e4, e5, e6}} -#if defined(__STDC_VERSION__) ? __STDC_VERSION__ >= 199901L : defined(__GNUC__) #define XEN_DEFINE_UUID(a, b, c, d, e1, e2, e3, e4, e5, e6) \ ((xen_uuid_t)XEN_DEFINE_UUID_(a, b, c, d, e1, e2, e3, e4, e5, e6)) -#else -#define XEN_DEFINE_UUID(a, b, c, d, e1, e2, e3, e4, e5, e6) \ - XEN_DEFINE_UUID_(a, b, c, d, e1, e2, e3, e4, e5, e6) -#endif /* __STDC_VERSION__ / __GNUC__ */ #endif /* !__ASSEMBLY__ */