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

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

On Wed, Jul 22, 2015 at 06:38:05PM +0300, Roman Bogorodskiy wrote:
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.
This could've been under the line. But ACK (even though it's pushed).
--- 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
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
participants (2)
-
Martin Kletzander
-
Roman Bogorodskiy