]> git.ipfire.org Git - thirdparty/git.git/commit
compat/zlib: provide `deflateBound()` shim centrally
authorPatrick Steinhardt <ps@pks.im>
Tue, 28 Jan 2025 08:41:31 +0000 (09:41 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Jan 2025 21:03:22 +0000 (13:03 -0800)
commita2dcb6999837c762b85735174eb16f941830a2e7
treef7546772f1addffbb4810e6fb0a2d3b832d41155
parent41f1a8435a900b660b7a6bc9da8dce2665e4b70a
compat/zlib: provide `deflateBound()` shim centrally

The `deflateBound()` function has only been introduced with zlib 1.2.0.
When linking against a zlib version older than that we thus provide our
own compatibility shim. Move this shim into "compat/zlib.h" so that we
can adapt it based on whether or not we use zlib-ng in a subsequent
commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/zlib-compat.h
git-zlib.c