From 18510020e75fd3f6a2c9e26057d9a188bee1fc21 Mon Sep 17 00:00:00 2001 From: Yuriy Chernyshov Date: Mon, 27 Dec 2021 13:39:39 +0300 Subject: [PATCH] Fix symbol conflict with musl libc `__libc` prefixed functions are used by musl libc as non-replaceable malloc stubs. Fix this conflict by checking if we are linking against glibc. --- src/jemalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jemalloc.c b/src/jemalloc.c index c8eef2de..990855c4 100644 --- a/src/jemalloc.c +++ b/src/jemalloc.c @@ -3239,7 +3239,7 @@ JEMALLOC_EXPORT void *(*__memalign_hook)(size_t alignment, size_t size) = je_memalign; # endif -# ifdef CPU_COUNT +# ifdef __GLIBC__ /* * To enable static linking with glibc, the libc specific malloc interface must * be implemented also, so none of glibc's malloc.o functions are added to the