On Windows, include io.h (for _setmode) and fcntl.h (for _O_BINARY). Needed for the special Windows ifdef. Reported by Tarmo Pikaro <tapika@yahoo.com>. --HG-- branch : HEAD
diff --git a/lib/zip_close.c b/lib/zip_close.c index 6b7f8d2..a74b080 100644 --- a/lib/zip_close.c +++ b/lib/zip_close.c
@@ -44,6 +44,10 @@ #endif #include <sys/types.h> #include <sys/stat.h> +#ifdef _WIN32 +#include <io.h> +#include <fcntl.h> +#endif static int add_data(struct zip *, struct zip_source *, struct zip_dirent *, FILE *);