From 9da3acfb1942ef28424ea58068faf6ac3a3fc2c8 Mon Sep 17 00:00:00 2001 From: Edgar Toernig Date: Sat, 30 Apr 2005 09:51:03 -0700 Subject: [PATCH] [PATCH] compat: support pre-1.2 zlib Older zlib's don't have deflateBound() --- cache.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cache.h b/cache.h index e27429eae..a10243d19 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 * -- 2.26.2