On cygwin, compilation failed because SIOCSIFHWADDR is undefined.
* src/util/virnetdev.c (virNetDevSetMAC): Cygwin can query but not
set mac address.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the build-breaker rule. I may have a few more
cygwin-related patches as I continue to try and build there, but
figured it's better to send things as individual patches instead
of squashing unrelated fixes in one go.
src/util/virnetdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index 0a3e17d..8013f23 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -132,7 +132,8 @@ int virNetDevExists(const char *ifname)
#endif
-#if defined(SIOCGIFHWADDR) && defined(HAVE_STRUCT_IFREQ)
+#if defined(SIOCGIFHWADDR) && defined(SIOCSIFHWADDR) && \
+ defined(HAVE_STRUCT_IFREQ)
/**
* virNetDevSetMAC:
* @ifname: interface name to set MTU for
--
1.8.1.4