mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
virnetdev: stub virNetDev{Add,Del}Multi on FreeBSD
Currently, build fails on FreeBSD because its struct ifreq does not have ifr_hwaddr member. In order to fix that, check if this member is present, otherwise fall back to the stub version of the virNetDev{Add,Del}Multi functions.
This commit is contained in:
parent
9babbaa5fe
commit
00fa136d0b
@ -2694,7 +2694,8 @@ AC_SUBST([ws_plugindir])
|
|||||||
# Check for Linux vs. BSD ifreq members
|
# Check for Linux vs. BSD ifreq members
|
||||||
AC_CHECK_MEMBERS([struct ifreq.ifr_newname,
|
AC_CHECK_MEMBERS([struct ifreq.ifr_newname,
|
||||||
struct ifreq.ifr_ifindex,
|
struct ifreq.ifr_ifindex,
|
||||||
struct ifreq.ifr_index],
|
struct ifreq.ifr_index,
|
||||||
|
struct ifreq.ifr_hwaddr],
|
||||||
[], [],
|
[], [],
|
||||||
[#include <sys/socket.h>
|
[#include <sys/socket.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
@ -1975,7 +1975,8 @@ virNetDevGetLinkInfo(const char *ifname,
|
|||||||
#endif /* defined(__linux__) */
|
#endif /* defined(__linux__) */
|
||||||
|
|
||||||
|
|
||||||
#if defined(SIOCADDMULTI) && defined(HAVE_STRUCT_IFREQ)
|
#if defined(SIOCADDMULTI) && defined(HAVE_STRUCT_IFREQ) && \
|
||||||
|
defined(HAVE_STRUCT_IFREQ_IFR_HWADDR)
|
||||||
/**
|
/**
|
||||||
* virNetDevAddMulti:
|
* virNetDevAddMulti:
|
||||||
* @ifname: interface name to which to add multicast MAC address
|
* @ifname: interface name to which to add multicast MAC address
|
||||||
@ -2023,7 +2024,8 @@ int virNetDevAddMulti(const char *ifname ATTRIBUTE_UNUSED,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(SIOCDELMULTI) && defined(HAVE_STRUCT_IFREQ)
|
#if defined(SIOCDELMULTI) && defined(HAVE_STRUCT_IFREQ) && \
|
||||||
|
defined(HAVE_STRUCT_IFREQ_IFR_HWADDR)
|
||||||
/**
|
/**
|
||||||
* virNetDevDelMulti:
|
* virNetDevDelMulti:
|
||||||
* @ifname: interface name from which to delete the multicast MAC address
|
* @ifname: interface name from which to delete the multicast MAC address
|
||||||
|
Loading…
x
Reference in New Issue
Block a user