提交 fc7c9544 编写于 作者: E Eric Blake 提交者: Cole Robinson

build: provide virNetDevSysfsFile on non-Linux

Commit 49ed6cff is broken on mingw and other non-linux platforms:

  CCLD     libvirt.la
  Cannot export virNetDevSysfsFile: symbol not defined
  collect2: error: ld returned 1 exit status

* src/util/virnetdev.c: Provide virNetDevSysfsFile fallback.
Signed-off-by: NEric Blake <eblake@redhat.com>
(cherry picked from commit 58dfc534)
上级 0911d1c6
...@@ -1777,6 +1777,17 @@ virNetDevGetVirtualFunctionInfo(const char *vfname ATTRIBUTE_UNUSED, ...@@ -1777,6 +1777,17 @@ virNetDevGetVirtualFunctionInfo(const char *vfname ATTRIBUTE_UNUSED,
_("Unable to get virtual function info on this platform")); _("Unable to get virtual function info on this platform"));
return -1; return -1;
} }
int
virNetDevSysfsFile(char **pf_sysfs_device_link ATTRIBUTE_UNUSED,
const char *ifname ATTRIBUTE_UNUSED,
const char *file ATTRIBUTE_UNUSED)
{
virReportSystemError(ENOSYS, "%s",
_("Unable to get sysfs info on this platform"));
return -1;
}
#endif /* !__linux__ */ #endif /* !__linux__ */
#if defined(__linux__) && defined(HAVE_LIBNL) && defined(IFLA_VF_MAX) #if defined(__linux__) && defined(HAVE_LIBNL) && defined(IFLA_VF_MAX)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册