From 01fc5ee20890b79b61d97352ac97f8dc23f2a8e5 Mon Sep 17 00:00:00 2001 From: Chris Peterson Date: Tue, 1 Jul 2014 18:49:52 -0700 Subject: [PATCH] Bug 1033188 - #include for getenv() function declaration. r=glandium --- memory/build/moz.build | 2 ++ memory/build/replace_malloc.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/memory/build/moz.build b/memory/build/moz.build index 5570830738a..7708ac53443 100644 --- a/memory/build/moz.build +++ b/memory/build/moz.build @@ -46,3 +46,5 @@ if CONFIG['MOZ_MEMORY'] and (CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin': # The zone allocator for OSX needs some jemalloc internal functions LOCAL_INCLUDES += ['/memory/jemalloc/src/include'] + +FAIL_ON_WARNINGS = True diff --git a/memory/build/replace_malloc.c b/memory/build/replace_malloc.c index 7efbd734c08..76127bcf83f 100644 --- a/memory/build/replace_malloc.c +++ b/memory/build/replace_malloc.c @@ -76,10 +76,11 @@ replace_malloc_init_funcs() } # elif defined(MOZ_WIDGET_ANDROID) # include +# include static void replace_malloc_init_funcs() { - char *replace_malloc_lib = getenv("MOZ_REPLACE_MALLOC_LIB"); + const char *replace_malloc_lib = getenv("MOZ_REPLACE_MALLOC_LIB"); if (replace_malloc_lib && *replace_malloc_lib) { void *handle = dlopen(replace_malloc_lib, RTLD_LAZY); if (handle) {