diff options
author | 2022-02-16 15:14:29 -0800 | |
---|---|---|
committer | 2022-02-16 15:14:30 -0800 | |
commit | 00e38ba6d801143a10f762d781e3e885243caa42 (patch) | |
tree | 0f423fcfd8edda84aca0f7a79da19295346bd15d /compat | |
parent | Merge branch 'tb/midx-bitmap-corruption-fix' (diff) | |
parent | compat: auto-detect if zlib has uncompress2() (diff) | |
download | tgif-00e38ba6d801143a10f762d781e3e885243caa42.tar.xz |
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 |