From: Timo Teräs malloc_usable_size is not defined on uclibc, so workaround that in jemalloc. Fix mozalloc linking. --- mozilla-release-old/memory/jemalloc/jemalloc.h +++ mozilla-release/memory/jemalloc/jemalloc.h @@ -75,8 +75,12 @@ /* Linux has memalign and malloc_usable_size */ #if !defined(MOZ_MEMORY_LINUX) void *memalign(size_t alignment, size_t size); -size_t malloc_usable_size(const void *ptr); #endif /* MOZ_MEMORY_LINUX */ + +#include +#if defined(__UCLIBC__) || !defined(MOZ_MEMORY_LINUX) +size_t malloc_usable_size(const void *ptr); +#endif void jemalloc_stats(jemalloc_stats_t *stats); --- mozilla-release-old/memory/mozalloc/Makefile.in +++ mozilla-release/memory/mozalloc/Makefile.in @@ -43,6 +43,10 @@ include $(DEPTH)/config/autoconf.mk +ifdef MOZ_MEMORY +SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,jemalloc,../jemalloc) +endif + VISIBILITY_FLAGS= STL_FLAGS = ifdef _MSC_VER