mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
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'.
This commit is contained in:
parent
18262b5587
commit
90cd148027
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
|
|
||||||
|
# include <unistd.h>
|
||||||
# include <libxml/uri.h>
|
# include <libxml/uri.h>
|
||||||
|
|
||||||
# include "internal.h"
|
# include "internal.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user