--- a/chess.h
+++ b/chess.h
@@ -25,7 +25,7 @@
 #include <assert.h>
 #include <stdlib.h>
 #if !defined(IPHONE)
-#  include <malloc.h>
+#  include <sys/malloc.h>
 #endif
 #include <string.h>
 #if !defined(TYPES_INCLUDED)