提交 08eb2821 编写于 作者: E Eric Blake

virnetlink: fix build on non-Linux

Commit 4dc04d3a added virNetlinkGetErrorCode, but forgot to provide
a fallback, which kills the build on mingw (among others):

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

* src/util/virnetlink.c (virNetlinkGetErrorCode): Provide fallback.
Signed-off-by: NEric Blake <eblake@redhat.com>
上级 e85df090
/*
* Copyright (C) 2010-2014 Red Hat, Inc.
* Copyright (C) 2010-2015 Red Hat, Inc.
* Copyright (C) 2010-2012 IBM Corporation
*
* This library is free software; you can redistribute it and/or
......@@ -276,7 +276,9 @@ int virNetlinkCommand(struct nl_msg *nl_msg,
return ret;
}
int virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen)
int
virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen)
{
struct nlmsgerr *err;
int result = 0;
......@@ -314,6 +316,7 @@ int virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen)
return -EINVAL;
}
static void
virNetlinkEventServerLock(virNetlinkEventSrvPrivatePtr driver)
{
......@@ -872,4 +875,13 @@ int virNetlinkEventRemoveClient(int watch ATTRIBUTE_UNUSED,
return -1;
}
int
virNetlinkGetErrorCode(struct nlmsghdr *resp ATTRIBUTE_UNUSED,
unsigned int recvbuflen ATTRIBUTE_UNUSED)
{
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _(unsupported));
return -EINVAL;
}
#endif /* __linux__ */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册