Skip to contentSkip to conversation

Fix for PV guest builds

PATCH New Christoph Egger 1 participant 1 message Aug 31, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix for PV guest builds

Hi!

In the public header,

DEFINE_XEN_GUEST_HANDLE is evaluated by the pre-processor twice. Do this also for XEN_GUEST_HANDLE.

This fixes a build error for PV guests (OpenBSD, NetBSD) where the use of XEN_GUEST_HANDLE(uint8_t) leads to a build error because uint8_t is a #define instead a typedef.

Signature · 12 lines
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy
xen/include/public/arch-x86/xen.h +3 -1
diff -r 9554ec3e27cd xen/include/public/arch-x86/xen.h
@@ -37,7 +37,9 @@
 #endif
 
 #define DEFINE_XEN_GUEST_HANDLE(name)   __DEFINE_XEN_GUEST_HANDLE(name, name)
-#define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
+/* DEFINE_XEN_GUEST_HANDLE is evaluated twice. Do so with XEN_GUEST_HANDLE. */
+#define __XEN_GUEST_HANDLE(name)        __guest_handle_ ## name
+#define XEN_GUEST_HANDLE(name)          __XEN_GUEST_HANDLE(name)
 #define set_xen_guest_handle(hnd, val)  do { (hnd).p = val; } while (0)
 #ifdef __XEN_TOOLS__
 #define get_xen_guest_handle(val, hnd)  do { val = (hnd).p; } while (0)

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