]> xenbits.xensource.com Git - libvirt.git/commitdiff
netdev: fix build on FreeBSD
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 22 Jul 2015 15:24:34 +0000 (18:24 +0300)
committerRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 22 Jul 2015 15:37:00 +0000 (18:37 +0300)
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

index 8981a845cd6d4c466af18ec790c5ec1171c16adb..7d91e2c0fd90a15b9fea57941f50e81ed816b532 100644 (file)
@@ -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