qga: Solaris has net/if_arp.h and netinet/if_ether.h but not ETHER_ADDR_LEN
PATCH 2/2 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 <[email protected]>
--- qga/commands-posix.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
qga/commands-posix.c +4 -1
@@ -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
Signature · 1 line
2.31.1
Reviewed-by Konstantin Kostiuk <[email protected]>
Quoted 30 lines · Nick Briggs
Solaris has
net/if_arp.handnetinet/if_ether.hrather thannet/ethernet.h, but does not defineETHER_ADDR_LEN, instead providing ETHERADDRL.Signed-off-by Nick Briggs <[email protected]>--- qga/commands-posix.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)qga/commands-posix.c +4
-2@@ -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 --2.31.1