mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-16 18:25:08 -06:00
build: allow mingw compilation with virCommand
Allows compilation, but no creation of child processes yet. Take it one step at a time. * src/util/util.c (virExecWithHook) [WIN32]: New dummy function. * src/libvirt_private.syms: Export it.
This commit is contained in:
parent
65c0f17acd
commit
3fbc30d96a
@ -811,6 +811,7 @@ virEventAddHandle;
|
||||
virEventRemoveHandle;
|
||||
virExec;
|
||||
virExecDaemonize;
|
||||
virExecWithHook;
|
||||
virFileAbsPath;
|
||||
virFileDeletePid;
|
||||
virFileExists;
|
||||
|
@ -912,6 +912,28 @@ virExec(const char *const*argv ATTRIBUTE_UNUSED,
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
virExecWithHook(const char *const*argv ATTRIBUTE_UNUSED,
|
||||
const char *const*envp ATTRIBUTE_UNUSED,
|
||||
const fd_set *keepfd ATTRIBUTE_UNUSED,
|
||||
pid_t *retpid ATTRIBUTE_UNUSED,
|
||||
int infd ATTRIBUTE_UNUSED,
|
||||
int *outfd ATTRIBUTE_UNUSED,
|
||||
int *errfd ATTRIBUTE_UNUSED,
|
||||
int flags ATTRIBUTE_UNUSED,
|
||||
virExecHook hook ATTRIBUTE_UNUSED,
|
||||
void *data ATTRIBUTE_UNUSED,
|
||||
char *pidfile ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* XXX: Some day we can implement pieces of virCommand/virExec on
|
||||
* top of _spawn() or CreateProcess(), but we can't implement
|
||||
* everything, since mingw completely lacks fork(), so we cannot
|
||||
* run hook code in the child. */
|
||||
virUtilError(VIR_ERR_INTERNAL_ERROR,
|
||||
"%s", _("virExec is not implemented for WIN32"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
virExecDaemonize(const char *const*argv ATTRIBUTE_UNUSED,
|
||||
const char *const*envp ATTRIBUTE_UNUSED,
|
||||
|
Loading…
Reference in New Issue
Block a user