Index: third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h |
diff --git a/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h b/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h |
index 3b858caa444261e5d36e6586fb3f39eb46c29907..feefe0ca45fa69b22a0617a36ef1313799ae6cc4 100644 |
--- a/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h |
+++ b/third_party/tcmalloc/chromium/src/libc_override_gcc_and_weak.h |
@@ -94,7 +94,12 @@ extern "C" { |
struct mallinfo mallinfo(void) __THROW ALIAS(tc_mallinfo); |
#endif |
size_t malloc_size(void* p) __THROW ALIAS(tc_malloc_size); |
+#if defined(__ANDROID__) && defined(ANDROID_NON_SDK_BUILD) |
+ // In Android tree this function is defined differently than in the NDK. |
+ size_t malloc_usable_size(const void* p) __THROW ALIAS(tc_malloc_size); |
+#else |
size_t malloc_usable_size(void* p) __THROW ALIAS(tc_malloc_size); |
+#endif |
} // extern "C" |
#undef ALIAS |