NetBSD: use system-provided headers
PATCH v2 1/1 NetBSD: use system-provided headers
On NetBSD use the system-provided headers for ioctl and related definitions, they are up to date and have more chances to match the kernel's idea of the ioctls and structures.
Remove now-unused NetBSD/evtchn.h and NetBSD/privcmd.h.
Don't fail install if xen/sys/*.h are not present.
Signed-off-by Manuel Bouyer <[email protected]>
--- tools/debugger/gdbsx/xg/xg_main.c | 4 + tools/include/Makefile | 2 + tools/include/xen-sys/NetBSD/evtchn.h | 86 -------------------- tools/include/xen-sys/NetBSD/privcmd.h | 106 ------------------------- tools/libs/call/private.h | 4 + tools/libs/ctrl/xc_private.h | 4 + tools/libs/foreignmemory/private.h | 6 ++ 7 files changed, 20 insertions(+), 192 deletions(-) delete mode 100644 tools/include/xen-sys/NetBSD/evtchn.h delete mode 100644 tools/include/xen-sys/NetBSD/privcmd.h
tools/debugger/gdbsx/xg/xg_main.c +4 -0
@@ -49,7 +49,11 @@#include "xg_public.h" #include <xen/version.h> #include <xen/domctl.h> +#ifdef __NetBSD__ +#include <xen/xenio.h> +#else #include <xen/sys/privcmd.h> +#endif #include <xen/foreign/x86_32.h> #include <xen/foreign/x86_64.h>
tools/include/Makefile +2 -0
@@ -68,7 +68,9 @@ install: all $(INSTALL_DATA) xen/foreign/*.h $(DESTDIR)$(includedir)/xen/foreign $(INSTALL_DATA) xen/hvm/*.h $(DESTDIR)$(includedir)/xen/hvm $(INSTALL_DATA) xen/io/*.h $(DESTDIR)$(includedir)/xen/io +ifneq ($(wildcard xen/sys/*.h),) $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(includedir)/xen/sys +endif $(INSTALL_DATA) xen/xsm/*.h $(DESTDIR)$(includedir)/xen/xsm .PHONY: uninstall
tools/include/xen-sys/NetBSD/evtchn.h deleted +0 -86
86 lines not on this page · raw message
tools/include/xen-sys/NetBSD/privcmd.h deleted +0 -106
106 lines not on this page · raw message
tools/libs/call/private.h +4 -0
@@ -7,7 +7,11 @@#include <xencall.h> #include <xen/xen.h> +#ifdef __NetBSD__ +#include <xen/xenio.h> +#else #include <xen/sys/privcmd.h> +#endif #ifndef PAGE_SHIFT /* Mini-os, Yukk */ #define PAGE_SHIFT 12
tools/libs/ctrl/xc_private.h +4 -0
@@ -39,7 +39,11 @@#include <xenforeignmemory.h> #include <xendevicemodel.h> +#ifdef __NetBSD__ +#include <xen/xenio.h> +#else #include <xen/sys/privcmd.h> +#endif #include <xen-tools/libs.h>
tools/libs/foreignmemory/private.h +6 -0
@@ -8,7 +8,13 @@#include <xentoolcore_internal.h> #include <xen/xen.h> + +#ifdef __NetBSD__ +#include <xen/xen.h> +#include <xen/xenio.h> +#else #include <xen/sys/privcmd.h> +#endif #ifndef PAGE_SHIFT /* Mini-os, Yukk */ #define PAGE_SHIFT 12
Signature · 1 line
2.29.2
Sorry I forgot to change the Subject. It should have been [PATCH v3]
Signature · 3 lines
Manuel Bouyer <[email protected]> NetBSD: 26 ans d'experience feront toujours la difference --