diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-08-12 21:58:38 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-08-12 21:58:38 +0000 |
commit | dd77591de8a2ecc5a787ad09363c1406b1ce83d1 (patch) | |
tree | 13e1daa1c0ff63f4da7c8d768a1386b38457cbaa | |
parent | 8b28ac89b2cde9639b49b834aee879ab810997b1 (diff) | |
parent | 7326a7c470d6506cd5eb5d1ea962dadded377a48 (diff) | |
download | jemalloc_new-dd77591de8a2ecc5a787ad09363c1406b1ce83d1.tar.gz |
Snap for 7636515 from 7326a7c470d6506cd5eb5d1ea962dadded377a48 to build-tools-release
Change-Id: I3984c8b5bb8508238549318c8e8e9ecb93f68b3c
-rw-r--r-- | Android.bp | 5 | ||||
-rw-r--r-- | include/jemalloc/internal/jemalloc_internal_defs_host.h | 2 | ||||
-rw-r--r-- | src/jemalloc.c | 2 |
3 files changed, 8 insertions, 1 deletions
@@ -201,6 +201,11 @@ cc_library { system_shared_libs: [], header_libs: ["libc_headers"], }, + musl: { + // Linking against musl uses libjemalloc5 by default, list only + // libc_musl here to avoid a circular dependency. + system_shared_libs: ["libc_musl"], + }, }, } diff --git a/include/jemalloc/internal/jemalloc_internal_defs_host.h b/include/jemalloc/internal/jemalloc_internal_defs_host.h index 38f91bc2..f4c973bf 100644 --- a/include/jemalloc/internal/jemalloc_internal_defs_host.h +++ b/include/jemalloc/internal/jemalloc_internal_defs_host.h @@ -376,6 +376,8 @@ /* * Defined if strerror_r returns char * if _GNU_SOURCE is defined. */ +#ifdef __GLIBC__ #define JEMALLOC_STRERROR_R_RETURNS_CHAR_WITH_GNU_SOURCE +#endif #endif /* JEMALLOC_INTERNAL_DEFS_H_ */ diff --git a/src/jemalloc.c b/src/jemalloc.c index 0584362f..bf5976b3 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -111,7 +111,7 @@ static uint8_t malloc_slow_flags; #ifdef JEMALLOC_THREADED_INIT /* Used to let the initializing thread recursively allocate. */ -# define NO_INITIALIZER ((unsigned long)0) +# define NO_INITIALIZER ((pthread_t)0) # define INITIALIZER pthread_self() # define IS_INITIALIZER (malloc_initializer == pthread_self()) static pthread_t malloc_initializer = NO_INITIALIZER; |