--- src/utils/cdk/gdstubs.c.orig	Wed Nov 23 14:46:54 2016
+++ src/utils/cdk/gdstubs.c	Wed Nov 23 14:46:57 2016
@@ -23,6 +23,7 @@
 #include "../../../config/config.h"
 
 #include <stdio.h>
+#include <stdint.h>
 #include <stdlib.h>
 
 #include <caml/mlvalues.h>
@@ -489,7 +490,7 @@ int ml_image_pngversion(void)
   CAMLlocal1 (v);
 #ifdef HAVE_PNGVERSION
   #include <png.h>
-  v = copy_int32 ((int32)png_access_version_number());
+  v = copy_int32 ((int32_t)png_access_version_number());
   CAMLreturn (v);
 #else
   raise_constant(*(value *)caml_named_value("gd type not supported"));
