@@ -99,8 +99,6 @@ xen-hptool: xen-hptool.o
xenhypfs.o: CFLAGS += $(CFLAGS_libxenhypfs)
-# xen-mfndump incorrectly uses libxc internals
-xen-mfndump.o: CFLAGS += -I$(XEN_ROOT)/tools/libxc $(CFLAGS_libxencall)
xen-mfndump: xen-mfndump.o
$(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenevtchn) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(APPEND_LDFLAGS)
@@ -1,15 +1,20 @@
-#define XC_WANT_COMPAT_MAP_FOREIGN_API
-#include <xenctrl.h>
-#include <xc_private.h>
-#include <xc_core.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/mman.h>
#include <unistd.h>
#include <inttypes.h>
+#define XC_WANT_COMPAT_MAP_FOREIGN_API
+#include <xenctrl.h>
+#include <xenguest.h>
+
#include <xen-tools/libs.h>
#define M2P_SIZE(_m) ROUNDUP(((_m) * sizeof(xen_pfn_t)), 21)
#define is_mapped(pfn_type) (!((pfn_type) & 0x80000000UL))
+#define ERROR(msg, args...) fprintf(stderr, msg, ## args)
+
static xc_interface *xch;
int help_func(int argc, char *argv[])
The last libxc internal used by xen-mfndump.c is the ERROR() macro. Add a simple definition for that macro to xen-mfndump.c and replace the libxc private header includes by official ones. Signed-off-by: Juergen Gross <jgross@suse.com> --- tools/misc/Makefile | 2 -- tools/misc/xen-mfndump.c | 13 +++++++++---- 2 files changed, 9 insertions(+), 6 deletions(-)