[J-core] [PATCH 2/4] Only include malloc.h if it exists.

Christopher Friedt chrisfriedt at gmail.com
Wed May 11 08:20:33 EDT 2016


From: Christopher Friedt <chris at mmbnetworks.com>

Mac OS X does not have a file called malloc.h

Signed-off-by: Christopher Friedt <chrisfriedt at gmail.com>
---
 tools/genram/genram.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/genram/genram.c b/tools/genram/genram.c
index 25f4de7..35ecb01 100644
--- a/tools/genram/genram.c
+++ b/tools/genram/genram.c
@@ -12,7 +12,9 @@
 
 #include <stdio.h>
 #include <string.h>
+#if !( defined(__APPLE__) && defined(__MACH__) )
 #include <malloc.h>
+#endif  /* !( defined(__APPLE__) && defined(__MACH__) ) */
 #include <stdlib.h>
 
 #ifndef RAMSIZE
-- 
2.7.4 (Apple Git-66)



More information about the J-core mailing list