diff options
author | Nick Briggs <nicholas.h.briggs@gmail.com> | 2024-01-11 14:43:22 -0500 |
---|---|---|
committer | Konstantin Kostiuk <kkostiuk@redhat.com> | 2024-01-30 12:14:28 +0200 |
commit | b3e0f64487a4b937d871ce4ce9c259e02ec02191 (patch) | |
tree | bbfe6b98fcd60b393968253cd0a249e3665307b4 /qga | |
parent | 7c4486350a79532580a37d42abdeb1dc7e4fa6c9 (diff) |
qga: Solaris has net/if_arp.h and netinet/if_ether.h but not ETHER_ADDR_LEN
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>
Diffstat (limited to 'qga')
-rw-r--r-- | qga/commands-posix.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 6169bbf7a0..26008db497 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -45,9 +45,12 @@ #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 |