@@ -31,6 +31,8 @@
#include <xen/sys/gntdev.h>
#include <xen/sys/gntalloc.h>
+#include <xen-tools/libs.h>
+
#include "private.h"
#define DEVXEN "/dev/xen/"
@@ -244,63 +246,63 @@ int osdep_gnttab_grant_copy(xengnttab_handle *xgt,
int fd = xgt->fd;
struct ioctl_gntdev_grant_copy copy;
- XENGNTTAB_BUILD_BUG_ON(sizeof(struct ioctl_gntdev_grant_copy_segment) !=
- sizeof(xengnttab_grant_copy_segment_t));
-
- XENGNTTAB_BUILD_BUG_ON(__alignof__(struct ioctl_gntdev_grant_copy_segment) !=
- __alignof__(xengnttab_grant_copy_segment_t));
-
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- source.virt) !=
- offsetof(xengnttab_grant_copy_segment_t,
- source.virt));
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- source.foreign) !=
- offsetof(xengnttab_grant_copy_segment_t,
- source.foreign));
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- source.foreign.ref) !=
- offsetof(xengnttab_grant_copy_segment_t,
- source.foreign));
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- source.foreign.offset) !=
- offsetof(xengnttab_grant_copy_segment_t,
- source.foreign.offset));
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- source.foreign.domid) !=
- offsetof(xengnttab_grant_copy_segment_t,
- source.foreign.domid));
-
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- dest.virt) !=
- offsetof(xengnttab_grant_copy_segment_t,
- dest.virt));
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- dest.foreign) !=
- offsetof(xengnttab_grant_copy_segment_t,
- dest.foreign));
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- dest.foreign.ref) !=
- offsetof(xengnttab_grant_copy_segment_t,
- dest.foreign));
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- dest.foreign.offset) !=
- offsetof(xengnttab_grant_copy_segment_t,
- dest.foreign.offset));
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- dest.foreign.domid) !=
- offsetof(xengnttab_grant_copy_segment_t,
- dest.foreign.domid));
-
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- len) !=
- offsetof(xengnttab_grant_copy_segment_t, len));
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- flags) !=
- offsetof(xengnttab_grant_copy_segment_t, flags));
- XENGNTTAB_BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
- status) !=
- offsetof(xengnttab_grant_copy_segment_t, status));
+ BUILD_BUG_ON(sizeof(struct ioctl_gntdev_grant_copy_segment) !=
+ sizeof(xengnttab_grant_copy_segment_t));
+
+ BUILD_BUG_ON(__alignof__(struct ioctl_gntdev_grant_copy_segment) !=
+ __alignof__(xengnttab_grant_copy_segment_t));
+
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ source.virt) !=
+ offsetof(xengnttab_grant_copy_segment_t,
+ source.virt));
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ source.foreign) !=
+ offsetof(xengnttab_grant_copy_segment_t,
+ source.foreign));
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ source.foreign.ref) !=
+ offsetof(xengnttab_grant_copy_segment_t,
+ source.foreign));
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ source.foreign.offset) !=
+ offsetof(xengnttab_grant_copy_segment_t,
+ source.foreign.offset));
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ source.foreign.domid) !=
+ offsetof(xengnttab_grant_copy_segment_t,
+ source.foreign.domid));
+
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ dest.virt) !=
+ offsetof(xengnttab_grant_copy_segment_t,
+ dest.virt));
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ dest.foreign) !=
+ offsetof(xengnttab_grant_copy_segment_t,
+ dest.foreign));
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ dest.foreign.ref) !=
+ offsetof(xengnttab_grant_copy_segment_t,
+ dest.foreign));
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ dest.foreign.offset) !=
+ offsetof(xengnttab_grant_copy_segment_t,
+ dest.foreign.offset));
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ dest.foreign.domid) !=
+ offsetof(xengnttab_grant_copy_segment_t,
+ dest.foreign.domid));
+
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ len) !=
+ offsetof(xengnttab_grant_copy_segment_t, len));
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ flags) !=
+ offsetof(xengnttab_grant_copy_segment_t, flags));
+ BUILD_BUG_ON(offsetof(struct ioctl_gntdev_grant_copy_segment,
+ status) !=
+ offsetof(xengnttab_grant_copy_segment_t, status));
copy.segments = (struct ioctl_gntdev_grant_copy_segment *)segs;
copy.count = count;