From: Edgar Toernig Date: Sat, 30 Apr 2005 16:51:03 +0000 (-0700) Subject: [PATCH] compat: support pre-1.2 zlib X-Git-Tag: v0.99~693 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9da3acfb1942ef28424ea58068faf6ac3a3fc2c8;p=git.git [PATCH] compat: support pre-1.2 zlib Older zlib's don't have deflateBound() --- diff --git a/cache.h b/cache.h index e27429ea..a10243d1 100644 --- a/cache.h +++ b/cache.h @@ -17,6 +17,10 @@ #include SHA1_HEADER #include +#if ZLIB_VERNUM < 0x1200 +#define deflateBound(c,s) ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11) +#endif + /* * Basic data structures for the directory cache *