Fix mac sdk build.
Mac doesn't have malloc.h apparently. Just give the function that's
used from it a fake (though technically valid) definition. This code
isn't being run on mac hosts anyway.
Bug: 62065509
Test: none.
Change-Id: Ia89de61e752452629e5e8cd6bf267f139338826c
diff --git a/runtime/openjdkjvmti/ti_allocator.cc b/runtime/openjdkjvmti/ti_allocator.cc
index 8a0237d..575558d 100644
--- a/runtime/openjdkjvmti/ti_allocator.cc
+++ b/runtime/openjdkjvmti/ti_allocator.cc
@@ -31,7 +31,13 @@
#include "ti_allocator.h"
+#if defined(__APPLE__)
+// Apple doesn't have malloc.h. Just give this function a non-functional definition.
+#define malloc_usable_size(P) 0
+#else
#include <malloc.h>
+#endif
+
#include <atomic>
#include "art_jvmti.h"