summaryrefslogtreecommitdiff
path: root/pngmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'pngmem.c')
-rw-r--r--pngmem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pngmem.c b/pngmem.c
index 661c4f8a4..5d7abf14f 100644
--- a/pngmem.c
+++ b/pngmem.c
@@ -1,7 +1,7 @@
/* pngmem.c - stub functions for memory allocation
*
- * Last changed in libpng 1.4.0 [February 14, 2009]
+ * Last changed in libpng 1.4.0 [February 28, 2009]
* For conditions of distribution and use, see copyright notice in png.h
* Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -111,7 +111,7 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
* result, we would be truncating potentially larger memory requests
* (which should cause a fatal error) and introducing major problems.
*/
-
+#ifdef PNG_CALLOC_SUPPORTED
png_voidp PNGAPI
png_calloc(png_structp png_ptr, png_alloc_size_t size)
{
@@ -122,6 +122,7 @@ png_calloc(png_structp png_ptr, png_alloc_size_t size)
png_memset(ret,0,(png_size_t)size);
return (ret);
}
+#endif
png_voidp PNGAPI
png_malloc(png_structp png_ptr, png_alloc_size_t size)