[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] libs/evtchn: fix build on NetBSD
commit 3a0b215c6f69c3a73d3ea9591823cb28c4a84dea Author: From: Manuel Bouyer <bouyer@xxxxxxxxxx> AuthorDate: Mon Jan 18 18:38:41 2021 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Mon Jan 18 18:58:20 2021 +0000 libs/evtchn: fix build on NetBSD Use xenio3.h for ioctl definitions read_exact/write_exact seems to not be available here, which cause a gcc error. Use plain read/write, the xenevtchn interface won't do partial read/write on NetBSD anyway so it should be safe. This is in line with the rest of the OS specific helpers. Fixes: b7f76a699dc ('tools: Refactor /dev/xen/evtchn wrappers into libxenevtchn') Signed-off-by: Manuel Bouyer <bouyer@xxxxxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- tools/libs/evtchn/netbsd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libs/evtchn/netbsd.c b/tools/libs/evtchn/netbsd.c index 60a9235978..1cebc21ffc 100644 --- a/tools/libs/evtchn/netbsd.c +++ b/tools/libs/evtchn/netbsd.c @@ -25,10 +25,10 @@ #include <sys/ioctl.h> -#include <xen/sys/evtchn.h> - #include "private.h" +#include <xen/xenio3.h> + #define EVTCHN_DEV_NAME "/dev/xenevt" int osdep_evtchn_open(xenevtchn_handle *xce, unsigned int flags) @@ -138,7 +138,7 @@ xenevtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce) int fd = xce->fd; evtchn_port_t port; - if ( read_exact(fd, (char *)&port, sizeof(port)) == -1 ) + if ( read(fd, (char *)&port, sizeof(port)) == -1 ) return -1; return port; @@ -148,7 +148,7 @@ int xenevtchn_unmask(xenevtchn_handle *xce, evtchn_port_t port) { int fd = xce->fd; - return write_exact(fd, (char *)&port, sizeof(port)); + return write(fd, (char *)&port, sizeof(port)); } /* -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |