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

Martin Kletzander mkletzan at redhat.com
Thu Jul 23 06:48:14 UTC 2015


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 at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150723/c4e64cd6/attachment-0001.sig>


More information about the libvir-list mailing list