From: Eric Blake Date: Mon, 5 Jan 2015 22:08:08 +0000 (-0700) Subject: virnetlink: fix build on non-Linux X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=08eb2821f57c8b93300b86bee4913c2278838537;p=libvirt.git 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 --- diff --git a/src/util/virnetlink.c b/src/util/virnetlink.c index 1a2b7a1b0d..d52f66acf5 100644 --- a/src/util/virnetlink.c +++ b/src/util/virnetlink.c @@ -1,5 +1,5 @@ /* - * 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__ */