[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] stubdom: foreignmemory: Fix build after 0dbb4be739c5



commit 3a98c1a4cec1a302beaddf944ded240b61173f87
Author:     Julien Grall <jgrall@xxxxxxxxxx>
AuthorDate: Tue Jul 13 10:20:19 2021 +0100
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Tue Jul 13 12:58:29 2021 +0100

    stubdom: foreignmemory: Fix build after 0dbb4be739c5
    
    Commit 0dbb4be739c5 add the inclusion of xenctrl.h from private.h and
    wreck the build in an interesting way:
    
    In file included from xen/stubdom/include/xen/domctl.h:39:0,
                     from xen/tools/include/xenctrl.h:36,
                     from private.h:4,
                     from minios.c:29:
    xen/include/public/memory.h:407:5: error: expected specifier-qualifier-list 
before â??XEN_GUEST_HANDLE_64â??
         XEN_GUEST_HANDLE_64(const_uint8) buffer;
         ^~~~~~~~~~~~~~~~~~~
    
    This is happening because xenctrl.h defines __XEN_TOOLS__ and therefore
    the public headers will start to expose the non-stable ABI. However,
    xen.h has already been included by a mini-OS header before hand. So
    there is a mismatch in the way the headers are included.
    
    For now solve it in a very simple (and gross) way by including
    xenctrl.h before the mini-os headers.
    
    Fixes: 0dbb4be739c5 ("tools/libs/foreignmemory: Fix PAGE_SIZE redefinition 
error")
    Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 tools/libs/foreignmemory/minios.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tools/libs/foreignmemory/minios.c 
b/tools/libs/foreignmemory/minios.c
index c5453736d5..f2f4dfb2be 100644
--- a/tools/libs/foreignmemory/minios.c
+++ b/tools/libs/foreignmemory/minios.c
@@ -17,6 +17,14 @@
  * Copyright 2007-2008 Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>.
  */
 
+/*
+ * xenctrl.h currently defines __XEN_TOOLS__ which affects what is
+ * exposed by Xen headers. As the define needs to be set consistently,
+ * we want to include xenctrl.h before the mini-os headers (they include
+ * public headers).
+ */
+#include <xenctrl.h>
+
 #include <mini-os/types.h>
 #include <mini-os/os.h>
 #include <mini-os/mm.h>
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.