1
0
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:
Daniel P. Berrange 2011-05-31 14:12:33 +01:00
parent 0796395283
commit ef983dfe5a
2 changed files with 5 additions and 15 deletions

View File

@ -94,15 +94,6 @@ virSysinfoRead(void) {
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 */
virSysinfoDefPtr
@ -220,6 +211,7 @@ no_memory:
ret = NULL;
goto cleanup;
}
#endif /* !WIN32 */
/**
* virSysinfoFormat:
@ -350,7 +342,7 @@ bool virSysinfoIsEqual(virSysinfoDefPtr src,
goto cleanup;
}
# define CHECK_FIELD(name, desc) \
#define CHECK_FIELD(name, desc) \
do { \
if (STRNEQ_NULLABLE(src->name, dst->name)) { \
virSmbiosReportError(VIR_ERR_CONFIG_UNSUPPORTED, \
@ -372,12 +364,10 @@ bool virSysinfoIsEqual(virSysinfoDefPtr src,
CHECK_FIELD(system_sku, "system sku");
CHECK_FIELD(system_family, "system family");
# undef CHECK_FIELD
#undef CHECK_FIELD
identical = true;
cleanup:
return identical;
}
#endif /* !WIN32 */

View File

@ -3850,10 +3850,10 @@ doMigrate (void *opaque)
vshCtrlData *data = opaque;
vshControl *ctl = data->ctl;
const vshCmd *cmd = data->cmd;
#if HAVE_PTHREAD_SIGMASK
sigset_t sigmask, oldsigmask;
const char *xmlfile = NULL;
char *xml = NULL;
#if HAVE_PTHREAD_SIGMASK
sigset_t sigmask, oldsigmask;
sigemptyset(&sigmask);
sigaddset(&sigmask, SIGINT);