diff options
author | Brad Smith <brad@comstyle.com> | 2022-11-12 06:40:43 -0500 |
---|---|---|
committer | Konstantin Kostiuk <kkostiuk@redhat.com> | 2022-12-20 15:54:41 +0200 |
commit | 28236ad8d152ffb8e7e7a280747df50cd8e49471 (patch) | |
tree | a297a65fac7dac4b8a1e0307ebf4f529628fc8f5 /qga/commands-posix.c | |
parent | cce910f219d3875c1c29aed70378d030f7110e01 (diff) |
qga: Add initial OpenBSD and NetBSD support
qga: Add initial OpenBSD and NetBSD support
Signed-off-by: Brad Smith <brad@comstyle.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Diffstat (limited to 'qga/commands-posix.c')
-rw-r--r-- | qga/commands-posix.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 <arpa/inet.h> #include <sys/socket.h> #include <net/if.h> +#if defined(__NetBSD__) || defined(__OpenBSD__) +#include <net/if_arp.h> +#include <netinet/if_ether.h> +#else #include <net/ethernet.h> +#endif #include <sys/types.h> #ifdef CONFIG_SOLARIS #include <sys/sockio.h> @@ -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 |