diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-02-17 02:14:29 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-02-17 02:14:30 +0300 |
commit | 00e38ba6d801143a10f762d781e3e885243caa42 (patch) | |
tree | 0f423fcfd8edda84aca0f7a79da19295346bd15d /compat | |
parent | f2cb46a6b3398308d148c037fdd786e6d45b59bf (diff) | |
parent | 07564773c2569d012719ab9e26b9b27251f3d354 (diff) |
Merge branch 'ab/auto-detect-zlib-compress2'
The build procedure has been taught to notice older version of zlib
and enable our replacement uncompress2() automatically.
* ab/auto-detect-zlib-compress2:
compat: auto-detect if zlib has uncompress2()
Diffstat (limited to 'compat')
-rw-r--r-- | compat/zlib-uncompress2.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compat/zlib-uncompress2.c b/compat/zlib-uncompress2.c index 722610b971..77a1b08048 100644 --- a/compat/zlib-uncompress2.c +++ b/compat/zlib-uncompress2.c @@ -1,3 +1,6 @@ +#include "git-compat-util.h" + +#if ZLIB_VERNUM < 0x1290 /* taken from zlib's uncompr.c commit cacf7f1d4e3d44d871b605da3b647f07d718623f @@ -8,16 +11,11 @@ */ -#include "../reftable/system.h" -#define z_const - /* * Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ -#include <zlib.h> - /* clang-format off */ /* =========================================================================== @@ -93,3 +91,6 @@ int ZEXPORT uncompress2 ( err == Z_BUF_ERROR && left + stream.avail_out ? Z_DATA_ERROR : err; } +#else +static void *dummy_variable = &dummy_variable; +#endif |