From 8163b3981d2767d15ef136756d82bca1cbd0336c Mon Sep 17 00:00:00 2001
From: "Meredith L. Patterson" <mlp@thesmartpolitenerd.com>
Date: Wed, 14 Nov 2012 14:05:25 -0500
Subject: [PATCH] Changed other instances of malloc.h to stdlib.h for OSX
 compat

---
 src/datastructures.c   | 2 +-
 src/internal.h         | 2 +-
 src/pprint.c           | 2 +-
 src/system_allocator.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/datastructures.c b/src/datastructures.c
index e94532ef..b1e4f754 100644
--- a/src/datastructures.c
+++ b/src/datastructures.c
@@ -2,7 +2,7 @@
 #include "hammer.h"
 #include "allocator.h"
 #include <assert.h>
-#include <malloc.h>
+#include <stdlib.h>
 #include <string.h>
 // {{{ counted arrays
 
diff --git a/src/internal.h b/src/internal.h
index 269bc4f5..67ecb22e 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -223,7 +223,7 @@ void  h_hashtable_del(HHashTable* ht, void* key);
 void  h_hashtable_free(HHashTable* ht);
 
 #if 0
-#include <malloc.h>
+#include <stdlib.h>
 #define h_arena_malloc(a, s) malloc(s)
 #endif
 
diff --git a/src/pprint.c b/src/pprint.c
index 3a8df824..1ffe7643 100644
--- a/src/pprint.c
+++ b/src/pprint.c
@@ -20,7 +20,7 @@
 #include <string.h>
 #include "hammer.h"
 #include "internal.h"
-#include <malloc.h>
+#include <stdlib.h>
 
 typedef struct pp_state {
   int delta;
diff --git a/src/system_allocator.c b/src/system_allocator.c
index 26e22736..7248fd2f 100644
--- a/src/system_allocator.c
+++ b/src/system_allocator.c
@@ -1,4 +1,4 @@
-#include <malloc.h>
+#include <stdlib.h>
 #include "internal.h"
 
 static void* system_alloc(HAllocator *allocator, size_t size) {
-- 
GitLab