]> git.sur5r.net Git - u-boot/blobdiff - lib/zlib/zutil.c
efi_selftest: fix typo in efi_selftest_devicepath.c
[u-boot] / lib / zlib / zutil.c
index 65f9554747b3f4936af75949da5fbe4e62ef0eb0..227343e48d3fb1305a229ac4b72559bda6351b48 100644 (file)
@@ -43,16 +43,17 @@ void z_error (m)
  */
 #ifndef MY_ZCALLOC /* Any system without a special alloc function */
 
+#ifdef __UBOOT__
+#include <malloc.h>
+#else
 #ifndef STDC
 extern voidp    malloc OF((uInt size));
 extern voidp    calloc OF((uInt items, uInt size));
 extern void     free   OF((voidpf ptr));
 #endif
+#endif
 
-voidpf zcalloc (opaque, items, size)
-       voidpf opaque;
-       unsigned items;
-       unsigned size;
+voidpf zcalloc(voidpf opaque, unsigned items, unsigned size)
 {
        if (opaque)
                items += size - size; /* make compiler happy */
@@ -60,10 +61,7 @@ voidpf zcalloc (opaque, items, size)
                (voidpf)calloc(items, size);
 }
 
-void  zcfree (opaque, ptr, nb)
-       voidpf opaque;
-       voidpf ptr;
-       unsigned nb;
+void  zcfree(voidpf opaque, voidpf ptr, unsigned nb)
 {
        free(ptr);
        if (opaque)