From 75be555dc6b84e46364ff9ea9e60f91fa82abe95 Mon Sep 17 00:00:00 2001 From: Paul Durrant Date: Tue, 14 Feb 2017 15:54:00 +0000 Subject: [PATCH] Make it compile under Xen 4.7 With... commit b7f76a699dcfadc0a52ab45b33cc72dbf3a69e7b Author: Ian Campbell Date: Mon Jun 1 16:20:09 2015 +0100 tools: Refactor /dev/xen/evtchn wrappers into libxenevtchn. commit 32486916793fd78a41fc25e53d2b53a5aa0b1bd5 Author: Ian Campbell 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 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 --- Makefile | 5 ++++- demu.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f7bcbd4..f8f5f4c 100644 --- 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 2933efb..af5ccd9 100644 --- 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; -- 2.39.5