diff options
author | Fabrice Fontaine <fontaine.fabrice@gmail.com> | 2018-10-06 20:43:19 +0200 |
---|---|---|
committer | Aliaksey Kandratsenka <alkondratenko@gmail.com> | 2018-10-06 16:58:55 -0700 |
commit | 1561f0946fcc96d1384dae2a81f3ed111338a341 (patch) | |
tree | f03149a773fb43137fc28cd1f6f8c5d4fe84c512 | |
parent | 1de76671d478e848f0dd210e00df43bfa463ca9f (diff) | |
download | gperftools-1561f0946fcc96d1384dae2a81f3ed111338a341.tar.gz |
check for __sbrk
__sbrk is not defined in musl so add a check for it in configure.ac and
replace the check on ifndef __UCLIBC__ by a check on ifdef HAVE__SBRK
in src/malloc_hook_mmap_linux.h
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/malloc_hook_mmap_linux.h | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index c1c33e6..22992fc 100644 --- a/configure.ac +++ b/configure.ac @@ -191,6 +191,7 @@ AC_CHECK_TYPES([__int64]) # defined in some windows platforms AC_CHECK_TYPES([struct mallinfo],,, [#include <malloc.h>]) AC_CHECK_TYPES([Elf32_Versym],,, [#include <elf.h>]) # for vdso_support.h AC_CHECK_FUNCS(sbrk) # for tcmalloc to get memory +AC_CHECK_FUNCS(__sbrk) # for tcmalloc to get memory AC_CHECK_FUNCS(geteuid) # for turning off services when run as root AC_CHECK_FUNCS(fork) # for the pthread_atfork setup AC_CHECK_HEADERS(features.h) # for vdso_support.h diff --git a/src/malloc_hook_mmap_linux.h b/src/malloc_hook_mmap_linux.h index 0d0c2a8..0eec895 100644 --- a/src/malloc_hook_mmap_linux.h +++ b/src/malloc_hook_mmap_linux.h @@ -207,7 +207,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, return result; } -#ifndef __UCLIBC__ +#ifdef HAVE___SBRK // libc's version: extern "C" void* __sbrk(intptr_t increment); |