mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
Fix sysinfo/virsh build problems on Win32
The virSysinfoIsEqual method was mistakenly inside a #ifndef WIN32 conditional. The existing virSysinfoFormat is also stubbed out on Win32, even though the code works without any trouble. This breaks XML output on Win32, so the stub is removed. virsh migrate mistakenly had some variables inside the conditional * src/util/sysinfo.c: Build virSysinfoIsEqual on Win32 and remove Win32 stub for virSysinfoFormat * tools/virsh.c: Fix variable declaration on Win32
This commit is contained in:
parent
0796395283
commit
ef983dfe5a
@ -94,15 +94,6 @@ virSysinfoRead(void) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
|
||||||
virSysinfoFormat(virSysinfoDefPtr def ATTRIBUTE_UNUSED,
|
|
||||||
const char *prefix ATTRIBUTE_UNUSED)
|
|
||||||
{
|
|
||||||
virReportSystemError(ENOSYS, "%s",
|
|
||||||
_("Host sysinfo extraction not supported on this platform"));
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* !WIN32 */
|
#else /* !WIN32 */
|
||||||
|
|
||||||
virSysinfoDefPtr
|
virSysinfoDefPtr
|
||||||
@ -220,6 +211,7 @@ no_memory:
|
|||||||
ret = NULL;
|
ret = NULL;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
#endif /* !WIN32 */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* virSysinfoFormat:
|
* virSysinfoFormat:
|
||||||
@ -379,5 +371,3 @@ bool virSysinfoIsEqual(virSysinfoDefPtr src,
|
|||||||
cleanup:
|
cleanup:
|
||||||
return identical;
|
return identical;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !WIN32 */
|
|
||||||
|
@ -3850,10 +3850,10 @@ doMigrate (void *opaque)
|
|||||||
vshCtrlData *data = opaque;
|
vshCtrlData *data = opaque;
|
||||||
vshControl *ctl = data->ctl;
|
vshControl *ctl = data->ctl;
|
||||||
const vshCmd *cmd = data->cmd;
|
const vshCmd *cmd = data->cmd;
|
||||||
#if HAVE_PTHREAD_SIGMASK
|
|
||||||
sigset_t sigmask, oldsigmask;
|
|
||||||
const char *xmlfile = NULL;
|
const char *xmlfile = NULL;
|
||||||
char *xml = NULL;
|
char *xml = NULL;
|
||||||
|
#if HAVE_PTHREAD_SIGMASK
|
||||||
|
sigset_t sigmask, oldsigmask;
|
||||||
|
|
||||||
sigemptyset(&sigmask);
|
sigemptyset(&sigmask);
|
||||||
sigaddset(&sigmask, SIGINT);
|
sigaddset(&sigmask, SIGINT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user