]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: fix build on mingw with netcf available
authorEric Blake <eblake@redhat.com>
Wed, 11 Jan 2012 13:48:14 +0000 (06:48 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 11 Jan 2012 14:54:10 +0000 (07:54 -0700)
commit90cd148027ac94f6f07279e490fc2809bc5a34b0
tree4630cccd4fb5266aac3755f0460993367bd70a3f
parent18262b5587026294b4fb02ae01849572d4fdc0f8
build: fix build on mingw with netcf available

The autobuilder pointed out an odd failure on mingw:
../../src/interface/netcf_driver.c:644:5: error: unknown field 'close_used_without_including_unistd_h' specified in initializer
cc1: warnings being treated as errors

This is because the gnulib headers #define close to different strings,
according to which headers are included, in order to work around some
odd mingw problems with close(), and these defines happen to also
affect field members declared with a name of struct foo.close. As long
as all headers are included before both the definition and use of the
struct, the various #define doesn't matter, but the netcf file hit
an instance where things were included in a different order.  Fix this
for all clients that use a struct member named 'close'.

* src/driver.h: Include <unistd.h> before using 'close'.
src/driver.h