summaryrefslogtreecommitdiff
path: root/src/utilfuns/zlib/gzread.c
diff options
context:
space:
mode:
authorTeus Benschop <teusjannette@gmail.com>2018-10-28 11:51:26 +0100
committerTeus Benschop <teusjannette@gmail.com>2018-10-28 11:51:26 +0100
commit1d0ff54794b5edea7cdf1d2d66710a0fa885bcc5 (patch)
tree8ece5f9ef437fbb151f2b22ed0c6e1a714879c7c /src/utilfuns/zlib/gzread.c
parentc7dbdc9161a7c460526b80fe01af49d714856126 (diff)
New upstream version 1.8.1
Diffstat (limited to 'src/utilfuns/zlib/gzread.c')
-rw-r--r--src/utilfuns/zlib/gzread.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/utilfuns/zlib/gzread.c b/src/utilfuns/zlib/gzread.c
index bf4538e..b6c99cd 100644
--- a/src/utilfuns/zlib/gzread.c
+++ b/src/utilfuns/zlib/gzread.c
@@ -5,6 +5,13 @@
#include "gzguts.h"
+#if !defined(__GNUC__) && !defined(_WIN32_WCE)
+#include <io.h>
+#include <direct.h>
+#else
+#include <unistd.h>
+#endif
+
/* Local functions */
local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *));
local int gz_avail OF((gz_statep));
@@ -27,7 +34,7 @@ local int gz_load(state, buf, len, have)
*have = 0;
do {
- ret = read(state->fd, buf + *have, len - *have);
+ ret = (int)read(state->fd, buf + *have, len - *have);
if (ret <= 0)
break;
*have += ret;