[PATCH] Fix libXpm build with NO_ZPIPE

Claudio Bley cbley at av-test.de
Mon May 27 00:32:05 PDT 2013


When NO_ZPIPE is defined, fcntl.h is not included in WrFFrI.c
although OpenWriteFile uses open, O_WRONLY, O_CREAT and O_TRUNC.

    * src/WrFFrI.c: unconditionally include fcntl.h regardless
     of NO_ZPIPE being defined or not.
---
Note, this fixes the build on MS Windows where FOR_MSW triggers
the define of NO_ZPIPE.

 src/WrFFrI.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/WrFFrI.c b/src/WrFFrI.c
index b592fa1..53e16fe 100644
--- a/src/WrFFrI.c
+++ b/src/WrFFrI.c
@@ -45,11 +45,12 @@
 #ifndef NO_ZPIPE
 #include "sys/wait.h"
 #include "sys/types.h"
-#include "fcntl.h"
 #include "unistd.h"
 #include "errno.h"
 #endif
 
+#include "fcntl.h"
+
 /* MS Windows define a function called WriteFile @#%#&!!! */
 LFUNC(xpmWriteFile, int, (FILE *file, XpmImage *image, const char *name,
 			  XpmInfo *info));
-- 
1.8.1.msysgit.1



More information about the xorg-devel mailing list