summaryrefslogtreecommitdiff
path: root/git-zlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'git-zlib.c')
-rw-r--r--git-zlib.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/git-zlib.c b/git-zlib.c
index d43bbeb6da..651dd9e07c 100644
--- a/git-zlib.c
+++ b/git-zlib.c
@@ -59,7 +59,8 @@ static void zlib_post_call(git_zstream *s)
s->total_out = s->z.total_out;
s->total_in = s->z.total_in;
- s->next_in = s->z.next_in;
+ /* zlib-ng marks `next_in` as `const`, so we have to cast it away. */
+ s->next_in = (unsigned char *) s->z.next_in;
s->next_out = s->z.next_out;
s->avail_in -= bytes_consumed;
s->avail_out -= bytes_produced;
@@ -147,10 +148,6 @@ int git_inflate(git_zstream *strm, int flush)
return status;
}
-#if defined(NO_DEFLATE_BOUND) || ZLIB_VERNUM < 0x1200
-#define deflateBound(c,s) ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11)
-#endif
-
unsigned long git_deflate_bound(git_zstream *strm, unsigned long size)
{
return deflateBound(&strm->z, size);