Windows fixes by Cédric Tabin Based on https://github.com/nih-at/libzip/pull/11
diff --git a/THANKS b/THANKS index e3f78c2..745ca4b 100644 --- a/THANKS +++ b/THANKS
@@ -14,6 +14,7 @@ Boaz Stolk <bstolk@aweta.nl> Bogdan <bogiebog@gmail.com> Brian 'geeknik' Carpenter <geeknik@protonmail.ch> +Cédric Tabin Chris Nehren <cnehren+libzip@pobox.com> Coverity <info@coverity.com> Dane Springmeyer <dane.springmeyer@gmail.com>
diff --git a/regress/fseek.c b/regress/fseek.c index cafea66..fe95cec 100644 --- a/regress/fseek.c +++ b/regress/fseek.c
@@ -31,6 +31,8 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "compat.h" + #include <stdlib.h> #include "zip.h"
diff --git a/src/ziptool.c b/src/ziptool.c index 1a8e5c3..70e4508 100644 --- a/src/ziptool.c +++ b/src/ziptool.c
@@ -43,6 +43,9 @@ #ifdef _WIN32 /* WIN32 needs <fcntl.h> for _O_BINARY */ #include <fcntl.h> +#ifndef STDIN_FILENO +#define STDIN_FILENO _fileno(stdin) +#endif #endif #ifndef HAVE_GETOPT