[libvirt] PATCH: Fix Windows / mingw32 build

Jim Meyering jim at meyering.net
Tue Jan 6 15:38:12 UTC 2009


"Daniel P. Berrange" <berrange at redhat.com> wrote:
> There are a number of problems breaking the windows / mingw
> build currently.
>
>  - Use of 'close' without importing unistd.h
>  - Use of non-existant localtime_r
>  - ERROR macro from logging.h clashes with a symbol imported
>    from windows.h
>
> So this patch does
>
>  - Adds the missing unistd.h include
>  - Uses localtime() if localtime_r() is missing (as checked from
>    configure)

That all looks fine.
However, since there's an LGPLv2+ gnulib module that provides
localtime_r (called time_r) you may want to skip that part.
Or just go ahead with what you have and I'll undo
things when I've confirmed pulling in the new module works
as expected.




More information about the libvir-list mailing list