static z_stream stream;
-void *zalloc(void *, unsigned, unsigned);
-void zfree(void *, void *, unsigned);
-
/* Returns length of decompressed data. */
int cramfs_uncompress_block (void *dst, void *src, int srclen)
{
{
int err;
- stream.zalloc = zalloc;
- stream.zfree = zfree;
+ stream.zalloc = gzalloc;
+ stream.zfree = gzfree;
stream.next_in = 0;
stream.avail_in = 0;
struct internal_state {int dummy;}; /* hack for buggy compilers */
#endif
+extern void *gzalloc(void *, unsigned, unsigned);
+extern void gzfree(void *, void *, unsigned);
+
#ifdef __cplusplus
}
#endif
#define RESERVED 0xe0
#define DEFLATED 8
-void *zalloc(void *, unsigned, unsigned);
-void zfree(void *, void *, unsigned);
-
-void *zalloc(void *x, unsigned items, unsigned size)
+void *gzalloc(void *x, unsigned items, unsigned size)
{
void *p;
return (p);
}
-void zfree(void *x, void *addr, unsigned nb)
+void gzfree(void *x, void *addr, unsigned nb)
{
free (addr);
}
z_stream s;
int r;
- s.zalloc = zalloc;
- s.zfree = zfree;
+ s.zalloc = gzalloc;
+ s.zfree = gzfree;
r = inflateInit2(&s, -MAX_WBITS);
if (r != Z_OK) {