After finding an RPM of mingw32-curl for Fedora 11, I was able to successfully build the ESX driver on Ming32 with only a couple of tweaks. Daniel commit 8b135962ef026ef3ef1b5c5163b1213eeba9ec36 Author: Daniel P. Berrange <berrange@xxxxxxxxxx> Date: Thu Jul 30 16:40:29 2009 +0100 Enable ESX driver build on Mingw32 * autobuild.sh, mingw32-libvirt.spec.in: Enable esx on mingw32 * src/esx/esx_driver.c: Define AI_ADDRCONFIG if not set * src/esx/esx_util.c, src/esx/esx_vi_types.c: Always use %lld & friends, since gnulib guarentees we have these and not the target's own variants diff --git a/autobuild.sh b/autobuild.sh index 239372c..d3934ea 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -78,7 +78,6 @@ if [ -x /usr/bin/i686-pc-mingw32-gcc ]; then --without-openvz \ --without-one \ --without-phyp \ - --without-esx \ --without-netcf \ --without-libvirtd diff --git a/mingw32-libvirt.spec.in b/mingw32-libvirt.spec.in index 8fd08a6..40a8124 100644 --- a/mingw32-libvirt.spec.in +++ b/mingw32-libvirt.spec.in @@ -54,7 +54,6 @@ MinGW Windows libvirt virtualization library. --without-openvz \ --without-one \ --without-phyp \ - --without-esx \ --without-netcf \ --without-libvirtd make diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index e3d60a5..08d82f9 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -1769,7 +1769,7 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) for (value = perfMetricIntSeries->value; value != NULL; value = value->_next) { - VIR_DEBUG("value %"PRIi64, value->value); + VIR_DEBUG("value %lld", (long long int)value->value); } } } @@ -2399,8 +2399,8 @@ esxDomainGetSchedulerParameters(virDomainPtr domain, default: ESX_ERROR(domain->conn, VIR_ERR_INTERNAL_ERROR, - "Shares level has unknown value %"PRIi32, - sharesInfo->level); + "Shares level has unknown value %d", + (int)sharesInfo->level); goto failure; } diff --git a/src/esx/esx_util.c b/src/esx/esx_util.c index 5c87ea3..a113fde 100644 --- a/src/esx/esx_util.c +++ b/src/esx/esx_util.c @@ -41,6 +41,10 @@ virReportErrorHelper (conn, VIR_FROM_ESX, code, __FILE__, __FUNCTION__, \ __LINE__, fmt) +/* AI_ADDRCONFIG is missing on some systems. */ +#ifndef AI_ADDRCONFIG +# define AI_ADDRCONFIG 0 +#endif char * @@ -435,12 +439,12 @@ esxUtil_GetConfigLong(virConnectPtr conn, virConfPtr conf, const char *name, int esxUtil_GetConfigBoolean(virConnectPtr conn, virConfPtr conf, - const char *name, int *boolean, int default_, + const char *name, int *boolval, int default_, int optional) { virConfValuePtr value; - *boolean = default_; + *boolval = default_; value = virConfGetValue(conf, name); if (value == NULL) { @@ -465,9 +469,9 @@ esxUtil_GetConfigBoolean(virConnectPtr conn, virConfPtr conf, } if (STRCASEEQ(value->str, "true")) { - *boolean = 1; + *boolval = 1; } else if (STRCASEEQ(value->str, "false")) { - *boolean = 0; + *boolval = 0; } else { ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR, "Config entry '%s' must represent a boolean value " diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c index 684b8c7..ab17460 100644 --- a/src/esx/esx_vi_types.c +++ b/src/esx/esx_vi_types.c @@ -962,7 +962,7 @@ esxVI_Int_DeepCopy(virConnectPtr conn, esxVI_Int **dest, esxVI_Int *src) /* esxVI_Int_Serialize */ ESX_VI__TEMPLATE__SERIALIZE_EXTRA(Int, "xsd:int", { - virBufferVSprintf(output, "%"PRIi32, item->value); + virBufferVSprintf(output, "%d", (int)item->value); }); /* esxVI_Int_SerializeList */ @@ -992,7 +992,7 @@ ESX_VI__TEMPLATE__LIST__APPEND(Long); /* esxVI_Long_Serialize */ ESX_VI__TEMPLATE__SERIALIZE_EXTRA(Long, "xsd:long", { - virBufferVSprintf(output, "%"PRIi64, item->value); + virBufferVSprintf(output, "%lld", (long long int)item->value); }); /* esxVI_Long_SerializeList */ -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list