mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -2694,7 +2694,8 @@ AC_SUBST([ws_plugindir])
|
||||
# Check for Linux vs. BSD ifreq members
|
||||
AC_CHECK_MEMBERS([struct ifreq.ifr_newname,
|
||||
struct ifreq.ifr_ifindex,
|
||||
struct ifreq.ifr_index],
|
||||
struct ifreq.ifr_index,
|
||||
struct ifreq.ifr_hwaddr],
|
||||
[], [],
|
||||
[#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
|
||||
@@ -1975,7 +1975,8 @@ virNetDevGetLinkInfo(const char *ifname,
|
||||
#endif /* defined(__linux__) */
|
||||
|
||||
|
||||
#if defined(SIOCADDMULTI) && defined(HAVE_STRUCT_IFREQ)
|
||||
#if defined(SIOCADDMULTI) && defined(HAVE_STRUCT_IFREQ) && \
|
||||
defined(HAVE_STRUCT_IFREQ_IFR_HWADDR)
|
||||
/**
|
||||
* virNetDevAddMulti:
|
||||
* @ifname: interface name to which to add multicast MAC address
|
||||
@@ -2023,7 +2024,8 @@ int virNetDevAddMulti(const char *ifname ATTRIBUTE_UNUSED,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SIOCDELMULTI) && defined(HAVE_STRUCT_IFREQ)
|
||||
#if defined(SIOCDELMULTI) && defined(HAVE_STRUCT_IFREQ) && \
|
||||
defined(HAVE_STRUCT_IFREQ_IFR_HWADDR)
|
||||
/**
|
||||
* virNetDevDelMulti:
|
||||
* @ifname: interface name from which to delete the multicast MAC address
|
||||
|
||||
Reference in New Issue
Block a user