qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] qga: Solaris has net/if_arp.h and netinet/if_ether.h but not ETHER_ADDR_LEN
@ 2024-01-11 19:43 Nick Briggs
  2024-01-17 17:12 ` Konstantin Kostiuk
  0 siblings, 1 reply; 2+ messages in thread
From: Nick Briggs @ 2024-01-11 19:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael Roth, Konstantin Kostiuk

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>
---
 qga/commands-posix.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] qga: Solaris has net/if_arp.h and netinet/if_ether.h but not ETHER_ADDR_LEN
  2024-01-11 19:43 [PATCH 2/2] qga: Solaris has net/if_arp.h and netinet/if_ether.h but not ETHER_ADDR_LEN Nick Briggs
@ 2024-01-17 17:12 ` Konstantin Kostiuk
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Kostiuk @ 2024-01-17 17:12 UTC (permalink / raw)
  To: Nick Briggs; +Cc: qemu-devel, Michael Roth

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>

On Thu, Jan 11, 2024 at 10:18 PM Nick Briggs <nicholas.h.briggs@gmail.com>
wrote:

> 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>
> ---
>  qga/commands-posix.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> 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
> --
> 2.31.1
>
>

[-- Attachment #2: Type: text/html, Size: 1612 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-17 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-11 19:43 [PATCH 2/2] qga: Solaris has net/if_arp.h and netinet/if_ether.h but not ETHER_ADDR_LEN Nick Briggs
2024-01-17 17:12 ` Konstantin Kostiuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).