]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qga: Solaris has net/if_arp.h and netinet/if_ether.h but not ETHER_ADDR_LEN
authorNick Briggs <nicholas.h.briggs@gmail.com>
Thu, 11 Jan 2024 19:43:22 +0000 (14:43 -0500)
committerKonstantin Kostiuk <kkostiuk@redhat.com>
Tue, 30 Jan 2024 10:14:28 +0000 (12:14 +0200)
Solaris has net/if_arp.h and netinet/if_ether.h rather than net/ethernet.h,
but does not define ETHER_ADDR_LEN, instead providing ETHERADDRL.

Signed-off-by: Nick Briggs <nicholas.h.briggs@gmail.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
qga/commands-posix.c

index 6169bbf7a015386bcdf9c08e4f31a9f5861c2689..26008db497e74b1dae85c4e28e7df0add1acbf9b 100644 (file)
 #include <arpa/inet.h>
 #include <sys/socket.h>
 #include <net/if.h>
-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__) || defined(CONFIG_SOLARIS)
 #include <net/if_arp.h>
 #include <netinet/if_ether.h>
+#if !defined(ETHER_ADDR_LEN) && defined(ETHERADDRL)
+#define ETHER_ADDR_LEN ETHERADDRL
+#endif
 #else
 #include <net/ethernet.h>
 #endif