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.
# 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>
#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
}
#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