From: "Christoph Egger" Subject: [PATCH] Fix for PV guest builds Date: Fri, 31 Aug 2007 11:35:44 +0200 Message-ID: <200708311135.44469.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_wD+1GzwhL7wv7qB" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_wD+1GzwhL7wv7qB Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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. Signed-off-by: Christoph Egger =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_wD+1GzwhL7wv7qB Content-Type: text/x-diff; charset=iso-8859-1; name=xen_header.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=xen_header.diff diff -r 9554ec3e27cd xen/include/public/arch-x86/xen.h --- a/xen/include/public/arch-x86/xen.h Thu Aug 30 18:53:54 2007 +0100 +++ b/xen/include/public/arch-x86/xen.h Fri Aug 31 11:38:17 2007 +0000 @@ -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) --Boundary-00=_wD+1GzwhL7wv7qB Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_wD+1GzwhL7wv7qB--