提交 00fa136d 编写于 作者: R Roman Bogorodskiy

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.
上级 9babbaa5
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册