[PATCH] build: fix cygwin build in virnetdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]