qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Konstantin Kostiuk <kkostiuk@redhat.com>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: [PULL 4/4] qga: Solaris has net/if_arp.h and netinet/if_ether.h but not ETHER_ADDR_LEN
Date: Tue, 30 Jan 2024 12:58:56 +0200	[thread overview]
Message-ID: <20240130105856.27178-5-kkostiuk@redhat.com> (raw)
In-Reply-To: <20240130105856.27178-1-kkostiuk@redhat.com>

From: Nick Briggs <nicholas.h.briggs@gmail.com>

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 | 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.42.0



  parent reply	other threads:[~2024-01-30 10:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 10:58 [PULL 0/4] Misc changes guest agent Konstantin Kostiuk
2024-01-30 10:58 ` [PULL 1/4] guest-agent: improve help for --allow-rpcs and --block-rpcs Konstantin Kostiuk
2024-01-30 10:58 ` [PULL 2/4] tests/unit/test-qga: do not qualify executable paths Konstantin Kostiuk
2024-01-30 10:58 ` [PULL 3/4] qga-win: Fix guest-get-fsinfo multi-disks collection Konstantin Kostiuk
2024-01-30 10:58 ` Konstantin Kostiuk [this message]
2024-01-31 19:52 ` [PULL 0/4] Misc changes guest agent Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240130105856.27178-5-kkostiuk@redhat.com \
    --to=kkostiuk@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).