mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Avoid warning when compiling without IFF_VNET_HDR
* src/bridge.c: avoid a couple of unused var/func warnings
This commit is contained in:
parent
16208bca89
commit
8db5f642e9
@ -401,6 +401,7 @@ static int brSetInterfaceMtu(brControl *ctl,
|
|||||||
*
|
*
|
||||||
* Returns 0 in case of success or an errno code in case of failure.
|
* Returns 0 in case of success or an errno code in case of failure.
|
||||||
*/
|
*/
|
||||||
|
#ifdef IFF_VNET_HDR
|
||||||
static int
|
static int
|
||||||
brProbeVnetHdr(int tapfd)
|
brProbeVnetHdr(int tapfd)
|
||||||
{
|
{
|
||||||
@ -438,6 +439,7 @@ brProbeVnetHdr(int tapfd)
|
|||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* brAddTap:
|
* brAddTap:
|
||||||
@ -480,6 +482,8 @@ brAddTap(brControl *ctl,
|
|||||||
#ifdef IFF_VNET_HDR
|
#ifdef IFF_VNET_HDR
|
||||||
if (vnet_hdr && brProbeVnetHdr(fd))
|
if (vnet_hdr && brProbeVnetHdr(fd))
|
||||||
ifr.ifr_flags |= IFF_VNET_HDR;
|
ifr.ifr_flags |= IFF_VNET_HDR;
|
||||||
|
#else
|
||||||
|
(void) vnet_hdr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
strncpy(ifr.ifr_name, *ifname, IFNAMSIZ-1);
|
strncpy(ifr.ifr_name, *ifname, IFNAMSIZ-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user