diff --git a/magick/memory.c b/magick/memory.c
index 077b5f8..095c195 100644
--- a/magick/memory.c
+++ b/magick/memory.c
@@ -137,7 +137,12 @@
   Global declarations.
 */
 static MagickMemoryMethods
-  memory_methods = { malloc, realloc, free };
+  memory_methods =
+  {
+    (AcquireMemoryHandler) malloc,
+    (ResizeMemoryHandler) realloc,
+    (DestroyMemoryHandler)free
+  };
 
 #if defined(MAGICKCORE_EMBEDDABLE_SUPPORT)
 static MemoryInfo