Skip to contentSkip to conversation

fix compat mode type checking macros for gcc 4.5

PATCH New Jan Beulich 1 participant 1 message Mar 8, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix compat mode type checking macros for gcc 4.5

Just like with the __RING_SIZE() macro, the compat mode type checking macros also need changing in order to work with gcc 4.5.

xen/common/compat/memory.c +6 -7
@@ -7,6 +7,12 @@
 #include <asm/current.h>
 #include <compat/memory.h>
 
+#define xen_domid_t domid_t
+#define compat_domid_t domid_compat_t
+CHECK_TYPE(domid);
+#undef compat_domid_t
+#undef xen_domid_t
+
 int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE(void) compat)
 {
     int rc, split, op = cmd & MEMOP_CMD_MASK;
@@ -169,13 +175,6 @@ int compat_memory_op(unsigned int cmd, X
         case XENMEM_current_reservation:
         case XENMEM_maximum_reservation:
         case XENMEM_maximum_gpfn:
-        {
-#define xen_domid_t domid_t
-#define compat_domid_t domid_compat_t
-            CHECK_TYPE(domid);
-#undef compat_domid_t
-#undef xen_domid_t
-        }
         case XENMEM_maximum_ram_page:
             nat.hnd = compat;
             break;
xen/include/xen/compat.h +40 -23

84 lines not on this page · raw message

Just like with the __RING_SIZE() macro, the compat mode type checking macros also need changing in order to work with gcc 4.5.

xen/common/compat/memory.c +6 -7
@@ -7,6 +7,12 @@
 #include <asm/current.h>
 #include <compat/memory.h>
 
+#define xen_domid_t domid_t
+#define compat_domid_t domid_compat_t
+CHECK_TYPE(domid);
+#undef compat_domid_t
+#undef xen_domid_t
+
 int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE(void) compat)
 {
     int rc, split, op = cmd & MEMOP_CMD_MASK;
@@ -169,13 +175,6 @@ int compat_memory_op(unsigned int cmd, X
         case XENMEM_current_reservation:
         case XENMEM_maximum_reservation:
         case XENMEM_maximum_gpfn:
-        {
-#define xen_domid_t domid_t
-#define compat_domid_t domid_compat_t
-            CHECK_TYPE(domid);
-#undef compat_domid_t
-#undef xen_domid_t
-        }
         case XENMEM_maximum_ram_page:
             nat.hnd = compat;
             break;
xen/include/xen/compat.h +40 -23

84 lines not on this page · raw message

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel