]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Avoid warning when compiling without IFF_VNET_HDR
authorMaximilian Wilhelm <max@rfc2324.org>
Thu, 30 Jul 2009 15:27:25 +0000 (17:27 +0200)
committerDaniel Veillard <veillard@redhat.com>
Thu, 30 Jul 2009 15:28:44 +0000 (17:28 +0200)
* src/bridge.c: avoid a couple of unused var/func warnings

src/bridge.c

index 58e480ea3b1c43cbc21e6146a2af45977883fbe9..414d87bc96e36bbd09d63c94b52743adc9255dc1 100644 (file)
@@ -401,6 +401,7 @@ static int brSetInterfaceMtu(brControl *ctl,
  *
  * Returns 0 in case of success or an errno code in case of failure.
  */
+#ifdef IFF_VNET_HDR
 static int
 brProbeVnetHdr(int tapfd)
 {
@@ -438,6 +439,7 @@ brProbeVnetHdr(int tapfd)
     return 0;
 #endif
 }
+#endif
 
 /**
  * brAddTap:
@@ -480,6 +482,8 @@ brAddTap(brControl *ctl,
 #ifdef IFF_VNET_HDR
     if (vnet_hdr && brProbeVnetHdr(fd))
         ifr.ifr_flags |= IFF_VNET_HDR;
+#else
+    (void) vnet_hdr;
 #endif
 
     strncpy(ifr.ifr_name, *ifname, IFNAMSIZ-1);