]> xenbits.xensource.com Git - people/pauldu/demu.git/commitdiff
Make it compile under Xen 4.7
authorPaul Durrant <paul.durrant@citrix.com>
Tue, 14 Feb 2017 15:54:00 +0000 (15:54 +0000)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 14 Feb 2017 15:57:36 +0000 (15:57 +0000)
With...

commit b7f76a699dcfadc0a52ab45b33cc72dbf3a69e7b
Author: Ian Campbell <ian.campbell@citrix.com>
Date:   Mon Jun 1 16:20:09 2015 +0100

    tools: Refactor /dev/xen/evtchn wrappers into libxenevtchn.

commit 32486916793fd78a41fc25e53d2b53a5aa0b1bd5
Author: Ian Campbell <ian.campbell@citrix.com>
Date:   Thu Jun 18 16:30:19 2015 +0100

    tools: Refactor foreign memory mapping into libxenforeignmemory

...we need to use the compat layer.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Added the necessary definitions to the Makefile rather than demu.c to
make sure they are present in all source modules.
Also, drop the direction inclusion of xenctrl_compat.h.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Makefile
demu.c

index f7bcbd4da02b77fdb436103f877db314bbad3b79..f8f5f4c6db10dee833a80c5a29a239d36b8e8b7f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,10 @@ OBJS :=        device.o \
 CFLAGS  = -I$(shell pwd)/include
 
 # _GNU_SOURCE for asprintf.
-CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE 
+CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
+
+CFLAGS += -DXC_WANT_COMPAT_MAP_FOREIGN_API=1 -DXC_WANT_COMPAT_EVTCHN_API=1
+
 CFLAGS += -Wall -Werror -g -O1 
 
 ifeq ($(shell uname),Linux)
diff --git a/demu.c b/demu.c
index 2933efbca67e3dad8c0145972a94024c05c5b01b..af5ccd979b6ea35ff825ddf315f6ba3f6cd6736c 100644 (file)
--- a/demu.c
+++ b/demu.c
@@ -126,7 +126,7 @@ typedef enum {
 typedef struct demu_state {
     demu_seq_t          seq;
     xc_interface        *xch;
-    xc_interface        *xceh;
+    xc_evtchn           *xceh;
     domid_t             domid;
     unsigned int        vcpus;
     ioservid_t          ioservid;