[PATCH] Fix malloc_usable_size definition on Android

Mike Hommey mh+jemalloc at glandium.org
Wed May 21 03:04:20 PDT 2014


From: Mike Hommey <mh at glandium.org>

---
 configure.ac | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 57015d1..0f0d9a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -286,7 +286,14 @@ case "${host}" in
 	AC_DEFINE([JEMALLOC_HAS_ALLOCA_H])
 	AC_DEFINE([JEMALLOC_PURGE_MADVISE_DONTNEED], [ ])
 	AC_DEFINE([JEMALLOC_THREADED_INIT], [ ])
-	JEMALLOC_USABLE_SIZE_CONST=""
+	dnl Android's libc defines malloc_usable_size with a const void*
+	dnl argument.
+	case "${host}" in
+	  *android*) ;;
+          *)
+		JEMALLOC_USABLE_SIZE_CONST=""
+		;;
+	esac
 	default_munmap="0"
 	;;
   *-*-netbsd*)
-- 
2.0.0.rc2



More information about the jemalloc-discuss mailing list