Try fixing build on Windows.
diff --git a/lib/compat.h b/lib/compat.h
index 41b7ddb..91e72bb 100644
--- a/lib/compat.h
+++ b/lib/compat.h
@@ -77,6 +77,11 @@
#define EOVERFLOW EFBIG
#endif
+/* not supported on at least Windows */
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
+
#ifdef _WIN32
#if defined(HAVE__CHMOD)
#define chmod _chmod
@@ -191,4 +196,8 @@
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
#endif
+#ifndef S_ISREG
+#define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG)
+#endif
+
#endif /* compat.h */
diff --git a/lib/zip_source_filep.c b/lib/zip_source_filep.c
index b2fc4b7..51b34f2 100644
--- a/lib/zip_source_filep.c
+++ b/lib/zip_source_filep.c
@@ -644,7 +644,8 @@
flags |= O_RDONLY;
}
- if ((fd = open(name, flags)) < 0) {
+ /* mode argument needed on Windows */
+ if ((fd = open(name, flags, 0666)) < 0) {
return NULL;
}
if ((fp = fdopen(fd, writeable ? "r+b" : "rb")) == NULL) {