mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
e85df0901d
commit
08eb2821f5
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2010-2014 Red Hat, Inc.
|
* Copyright (C) 2010-2015 Red Hat, Inc.
|
||||||
* Copyright (C) 2010-2012 IBM Corporation
|
* Copyright (C) 2010-2012 IBM Corporation
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -276,7 +276,9 @@ int virNetlinkCommand(struct nl_msg *nl_msg,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen)
|
|
||||||
|
int
|
||||||
|
virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen)
|
||||||
{
|
{
|
||||||
struct nlmsgerr *err;
|
struct nlmsgerr *err;
|
||||||
int result = 0;
|
int result = 0;
|
||||||
@ -314,6 +316,7 @@ int virNetlinkGetErrorCode(struct nlmsghdr *resp, unsigned int recvbuflen)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
virNetlinkEventServerLock(virNetlinkEventSrvPrivatePtr driver)
|
virNetlinkEventServerLock(virNetlinkEventSrvPrivatePtr driver)
|
||||||
{
|
{
|
||||||
@ -872,4 +875,13 @@ int virNetlinkEventRemoveClient(int watch ATTRIBUTE_UNUSED,
|
|||||||
return -1;
|
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__ */
|
#endif /* __linux__ */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user