[libvirt] [PATCH] build: fix compilation on mingw

Eric Blake eblake at redhat.com
Mon Mar 28 20:20:08 UTC 2011


* src/util/command.c (virCommandAbort) [WIN32]: Provide stub.
Reported by Daniel P. Berrange's autobuilder.
---

Pushing this under the build-breaker rule, as it was caught by
Daniel's autobuilder.

 src/util/command.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/util/command.c b/src/util/command.c
index 905256e..2e475a0 100644
--- a/src/util/command.c
+++ b/src/util/command.c
@@ -1291,6 +1291,7 @@ virCommandWait(virCommandPtr cmd, int *exitstatus)
 }


+#ifndef WIN32
 /*
  * Abort an async command if it is running, without issuing
  * any errors or affecting errno.  Designed for error paths
@@ -1349,6 +1350,15 @@ cleanup:
     cmd->reap = false;
     errno = saved_errno;
 }
+#else /* WIN32 */
+void
+virCommandAbort(virCommandPtr cmd ATTRIBUTE_UNUSED)
+{
+    /* Mingw lacks WNOHANG and kill().  But since we haven't ported
+     * virExecWithHook to mingw yet, there's no process to be killed,
+     * making this implementation trivially correct for now :)  */
+}
+#endif

 /*
  * Release all resources
-- 
1.7.4




More information about the libvir-list mailing list