[libvirt] [PATCH] netdev: fix build on FreeBSD

Roman Bogorodskiy bogorodskiy at gmail.com
Wed Jul 22 15:38:05 UTC 2015


Commit ac3ed20 breaks build on FreeBSD with:

  CC       util/libvirt_util_la-virnetdev.lo
util/virnetdev.c:2967:1: error: unused function 'virNetDevRDMAFeature' [-Werror,-Wunused-function]
virNetDevRDMAFeature(const char *ifname,
^

So hide virNetDevRDMAFeature function under the #ifdef 'SIOCETHTOOL'
and 'HAVE_STRUCT_IFREQ' section.

Pushed under the build breaker rule.
---
 src/util/virnetdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c
index 8981a84..7d91e2c 100644
--- a/src/util/virnetdev.c
+++ b/src/util/virnetdev.c
@@ -2952,6 +2952,7 @@ int virNetDevGetRxFilter(const char *ifname,
     return ret;
 }
 
+#if defined(SIOCETHTOOL) && defined(HAVE_STRUCT_IFREQ)
 
 /**
  * virNetDevRDMAFeature
@@ -3014,7 +3015,6 @@ virNetDevRDMAFeature(const char *ifname,
     return ret;
 }
 
-#if defined(SIOCETHTOOL) && defined(HAVE_STRUCT_IFREQ)
 
 /**
  * virNetDevSendEthtoolIoctl
-- 
2.3.7




More information about the libvir-list mailing list