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>
This commit is contained in:
Nick Briggs 2024-01-11 14:43:22 -05:00 committed by Konstantin Kostiuk
parent 7c4486350a
commit b3e0f64487

View File

@ -45,9 +45,12 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <net/if.h> #include <net/if.h>
#if defined(__NetBSD__) || defined(__OpenBSD__) #if defined(__NetBSD__) || defined(__OpenBSD__) || defined(CONFIG_SOLARIS)
#include <net/if_arp.h> #include <net/if_arp.h>
#include <netinet/if_ether.h> #include <netinet/if_ether.h>
#if !defined(ETHER_ADDR_LEN) && defined(ETHERADDRL)
#define ETHER_ADDR_LEN ETHERADDRL
#endif
#else #else
#include <net/ethernet.h> #include <net/ethernet.h>
#endif #endif