This is slightly different from the previous version. The new part is the addition of the virRun stub to prevent a mingw link failure when building with shared libraries. Now, configured like this, it builds without error: /usr/bin/mingw32-configure --without-sasl --without-avahi \ --without-polkit --without-python --without-xen --without-qemu \ --without-lxc --without-openvz --without-libvirtd \ --prefix=/tmp/libvirt-inst --enable-compile-warnings=maximum >From 0b35049f3cd10dbfd650aae692c553e940409805 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@xxxxxxxxxx> Date: Thu, 6 Nov 2008 08:42:33 +0100 Subject: [PATCH 1/3] always compile iptables.c Avoid a build error when configuring --without-xen --without-qemu. * src/iptables.c [WITH_QEMU]: Don't #ifdef-out. * src/iptables.h [WITH_QEMU]: Don't #ifdef-out. * src/util.c (virRun) [__MINGW32__]: Define a stub that always fails. --- src/iptables.c | 4 ---- src/iptables.h | 6 +----- src/util.c | 12 ++++++++++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/iptables.c b/src/iptables.c index 53e0f41..ad7fddf 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -21,8 +21,6 @@ #include <config.h> -#if WITH_QEMU - #include <stdio.h> #include <stdlib.h> #include <stdarg.h> @@ -1120,5 +1118,3 @@ iptablesRemoveForwardMasquerade(iptablesContext *ctx, { return iptablesForwardMasquerade(ctx, network, physdev, REMOVE); } - -#endif /* WITH_QEMU */ diff --git a/src/iptables.h b/src/iptables.h index 95f07de..fbe9b5d 100644 --- a/src/iptables.h +++ b/src/iptables.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 Red Hat, Inc. + * Copyright (C) 2007, 2008 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,8 +22,6 @@ #ifndef __QEMUD_IPTABLES_H__ #define __QEMUD_IPTABLES_H__ -#if WITH_QEMU - typedef struct _iptablesContext iptablesContext; iptablesContext *iptablesContextNew (void); @@ -95,6 +93,4 @@ int iptablesRemoveForwardMasquerade (iptablesContext *ctx, const char *network, const char *physdev); -#endif /* WITH_QEMU */ - #endif /* __QEMUD_IPTABLES_H__ */ diff --git a/src/util.c b/src/util.c index abc86d6..6141847 100644 --- a/src/util.c +++ b/src/util.c @@ -580,6 +580,18 @@ virRun(virConnectPtr conn, #else /* __MINGW32__ */ int +virRun(virConnectPtr conn, + const char *const *argv ATTRIBUTE_UNUSED, + int *status) +{ + if (status) + *status = ENOTSUP; + else + ReportError (conn, VIR_ERR_INTERNAL_ERROR, __FUNCTION__); + return -1; +} + +int virExec(virConnectPtr conn, const char *const*argv ATTRIBUTE_UNUSED, const char *const*envp ATTRIBUTE_UNUSED, -- 1.6.0.3.756.gb776d -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list