On 04/15/2012 08:13 AM, Stefan Weil wrote: > tb.time is a time value, but not necessarily of the same size as time_t: > while time_t is 64 bit for w64, tb.time still is 32 bit only.
That's a POSIX compliance bug, but one that mingw64 inherited from Microsoft :( https://lists.gnu.org/archive/html/bug-gnulib/2012-01/msg00352.html > > Therefore we need en explicit conversion. Unfortunately true. > > Signed-off-by: Stefan Weil <s...@weilnetz.de> > --- > savevm.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/savevm.c b/savevm.c > index 12fb209..2d18bab 100644 > --- a/savevm.c > +++ b/savevm.c > @@ -2106,7 +2106,8 @@ void do_savevm(Monitor *mon, const QDict *qdict) > } > } else { > #ifdef _WIN32 > - ptm = localtime(&tb.time); > + time_t t = tb.time; > + ptm = localtime(&t); > strftime(sn->name, sizeof(sn->name), "vm-%Y%m%d%H%M%S", ptm); > #else > /* cast below needed for OpenBSD where tv_sec is still 'long' */ -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature