efi_selftest: Update .gitignore
[oweals/u-boot.git] / fs / cramfs / uncompress.c
index e4189e51dd11fa4d2024f8259342dde95e8a6daf..f431cc46c1f756bb3100d5dd9830099c241cc628 100644 (file)
 #include <common.h>
 #include <malloc.h>
 #include <watchdog.h>
-#include <zlib.h>
-
-#if defined(CONFIG_CMD_JFFS2)
+#include <u-boot/zlib.h>
 
 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)
 {
@@ -61,8 +56,8 @@ int cramfs_uncompress_init (void)
 {
        int err;
 
-       stream.zalloc = zalloc;
-       stream.zfree = zfree;
+       stream.zalloc = gzalloc;
+       stream.zfree = gzfree;
        stream.next_in = 0;
        stream.avail_in = 0;
 
@@ -86,5 +81,3 @@ int cramfs_uncompress_exit (void)
        inflateEnd (&stream);
        return 0;
 }
-
-#endif /* CFG_FS_CRAMFS */