[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 e27429eae979f207d3ccdf0c53fea424306ddeb6..a10243d192f5444a58a056ef5a21a4386af26fb3 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
  *