From 28236ad8d152ffb8e7e7a280747df50cd8e49471 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 12 Nov 2022 06:40:43 -0500 Subject: qga: Add initial OpenBSD and NetBSD support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qga: Add initial OpenBSD and NetBSD support Signed-off-by: Brad Smith Reviewed-by: Konstantin Kostiuk Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Konstantin Kostiuk --- qga/commands-posix.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'qga/commands-posix.c') diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 1a28326ec7..b19b9c5d18 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -45,7 +45,12 @@ #include #include #include +#if defined(__NetBSD__) || defined(__OpenBSD__) +#include +#include +#else #include +#endif #include #ifdef CONFIG_SOLARIS #include @@ -2872,7 +2877,7 @@ static int guest_get_network_stats(const char *name, return -1; } -#ifndef __FreeBSD__ +#ifndef CONFIG_BSD /* * Fill "buf" with MAC address by ifaddrs. Pointer buf must point to a * buffer with ETHER_ADDR_LEN length at least. @@ -2921,7 +2926,7 @@ bool guest_get_hw_addr(struct ifaddrs *ifa, unsigned char *buf, close(sock); return true; } -#endif /* __FreeBSD__ */ +#endif /* CONFIG_BSD */ /* * Build information about guest interfaces -- cgit v1.2.3