[PATCH] compat: support pre-1.2 zlib
authorEdgar Toernig <froese@gmx.de>
Sat, 30 Apr 2005 16:51:03 +0000 (09:51 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 30 Apr 2005 16:51:03 +0000 (09:51 -0700)
Older zlib's don't have deflateBound()

cache.h

diff --git a/cache.h b/cache.h
index e27429e..a10243d 100644 (file)
--- a/cache.h
+++ b/cache.h
 #include SHA1_HEADER
 #include <zlib.h>
 
+#if ZLIB_VERNUM < 0x1200
+#define deflateBound(c,s)  ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11)
+#endif
+
 /*
  * Basic data structures for the directory cache
  *