From 9da3acfb1942ef28424ea58068faf6ac3a3fc2c8 Mon Sep 17 00:00:00 2001 From: Edgar Toernig Date: Sat, 30 Apr 2005 09:51:03 -0700 Subject: [PATCH] compat: support pre-1.2 zlib Older zlib's don't have deflateBound() diff --git a/cache.h b/cache.h index e27429e..a10243d 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 * -- cgit v0.10.2-6-g49f6