]> xenbits.xensource.com Git - libvirt.git/commitdiff
build: fix compilation on mingw
authorEric Blake <eblake@redhat.com>
Mon, 28 Mar 2011 20:12:15 +0000 (14:12 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 28 Mar 2011 20:12:28 +0000 (14:12 -0600)
* src/util/command.c (virCommandAbort) [WIN32]: Provide stub.
Reported by Daniel P. Berrange's autobuilder.

src/util/command.c

index 905256e308fbda6b17a8485dffb009ce7d173a29..2e475a0ac05db8278aaf472211844cb6faa88ec8 100644 (file)
@@ -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