diff --git a/Documentation/howto/recover-corrupted-object-harder.adoc b/Documentation/howto/recover-corrupted-object-harder.adoc index 5efb4fe81f..86a1ba75cf 100644 --- a/Documentation/howto/recover-corrupted-object-harder.adoc +++ b/Documentation/howto/recover-corrupted-object-harder.adoc @@ -125,7 +125,7 @@ static int try_zlib(unsigned char *buf, int len) { /* make this absurdly large so we don't have to loop */ static unsigned char out[1024*1024]; - z_stream z; + struct z_stream_s z; int ret; memset(&z, 0, sizeof(z)); @@ -278,7 +278,7 @@ int main(int argc, char **argv) static unsigned char buf[25 * 1024 * 1024]; static unsigned char out[25 * 1024 * 1024]; int len; - z_stream z; + struct z_stream_s z; int ret; len = read(0, buf, sizeof(buf)); diff --git a/compat/zlib-compat.h b/compat/zlib-compat.h index 0c60e3af33..ac08276622 100644 --- a/compat/zlib-compat.h +++ b/compat/zlib-compat.h @@ -4,8 +4,8 @@ #ifdef HAVE_ZLIB_NG # include -# define z_stream zng_stream -#define gz_header_s zng_gz_header_s +# define z_stream_s zng_stream_s +# define gz_header_s zng_gz_header_s # define crc32(crc, buf, len) zng_crc32(crc, buf, len) diff --git a/git-zlib.h b/git-zlib.h index 1e8d9aabcb..0e66fefa8c 100644 --- a/git-zlib.h +++ b/git-zlib.h @@ -4,7 +4,7 @@ #include "compat/zlib-compat.h" typedef struct git_zstream { - z_stream z; + struct z_stream_s z; unsigned long avail_in; unsigned long avail_out; unsigned long total_in; diff --git a/reftable/block.h b/reftable/block.h index 3957aee429..422e2f872c 100644 --- a/reftable/block.h +++ b/reftable/block.h @@ -18,7 +18,7 @@ * allocation overhead. */ struct block_writer { - z_stream *zstream; + struct z_stream_s *zstream; unsigned char *compressed; size_t compressed_cap; @@ -62,8 +62,6 @@ int block_writer_finish(struct block_writer *w); /* clears out internally allocated block_writer members. */ void block_writer_release(struct block_writer *bw); -struct z_stream; - /* * A block part of a reftable. Contains records as well as some metadata * describing them. @@ -78,7 +76,7 @@ struct reftable_block { uint32_t hash_size; /* Uncompressed data for log entries. */ - z_stream *zstream; + struct z_stream_s *zstream; unsigned char *uncompressed_data; size_t uncompressed_cap;