On 05/15/2013 11:47 PM, Roman Bogorodskiy wrote:
This method is useful not only in virnetdev.c.
---
src/libvirt_private.syms | 1 +
src/util/virnetdev.c | 15 +++++++++++++--
src/util/virnetdev.h | 12 ++++++++++++
src/util/virnetdevmacvlan.c | 2 +-
src/util/virnetdevvportprofile.c | 2 +-
5 files changed, 28 insertions(+), 4 deletions(-)
+#else
+int
+virNetDevSetupControl(const char *ifname ATTRIBUTE_UNUSED,
+ void *ifr ATTRIBUTE_UNUSED)
+{
+ virReportSystemError(ENOSYS,
+ _("%s is not supported on this platform"),
+ __func__);
virReportSystemError is already a macro that reports the function name,
so your message would include the name twice. But offhand, I can't
think of any better wording to use.
+++ b/src/util/virnetdev.h
@@ -23,11 +23,23 @@
#ifndef __VIR_NETDEV_H__
# define __VIR_NETDEV_H__
+# include <config.h>
Headers should never need to include <config.h>. After all, the only
way to use a header is from a .c file, but the .c file should have
included <config.h> prior to any other header.
Looks reasonable once that is fixed up.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org