From 90cd148027ac94f6f07279e490fc2809bc5a34b0 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 11 Jan 2012 06:48:14 -0700 Subject: [PATCH] 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 before using 'close'. --- src/driver.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/driver.h b/src/driver.h index ec4abf3e4e..24636a43a2 100644 --- a/src/driver.h +++ b/src/driver.h @@ -8,6 +8,7 @@ # include "config.h" +# include # include # include "internal.h" -- GitLab