projects/aports·blob master · refs

33 lines · 1.2 KiB

1--- a/configure.ac
2+++ b/configure.ac
3@@ -687,6 +687,19 @@ case "${host}" in
4 fi
5 zero_realloc_default_free="1"
6 ;;
7+ *-*-linux-musl*)
8+ dnl syscall(2) and secure_getenv(3) are exposed by _GNU_SOURCE.
9+ JE_APPEND_VS(CPPFLAGS, -D_GNU_SOURCE)
10+ abi="elf"
11+ AC_DEFINE([JEMALLOC_PURGE_MADVISE_DONTNEED_ZEROS], [ ], [ ])
12+ AC_DEFINE([JEMALLOC_HAS_ALLOCA_H], [ ], [ ])
13+ AC_DEFINE([JEMALLOC_PROC_SYS_VM_OVERCOMMIT_MEMORY], [ ], [ ])
14+ AC_DEFINE([JEMALLOC_THREADED_INIT], [ ], [ ])
15+ if test "${LG_SIZEOF_PTR}" = "3"; then
16+ default_retain="1"
17+ fi
18+ zero_realloc_default_free="1"
19+ ;;
20 *-*-linux*)
21 dnl syscall(2) and secure_getenv(3) are exposed by _GNU_SOURCE.
22 JE_APPEND_VS(CPPFLAGS, -D_GNU_SOURCE)
23--- a/include/jemalloc/jemalloc_macros.h.in
24+++ b/include/jemalloc/jemalloc_macros.h.in
25@@ -142,7 +142,7 @@
26 # define JEMALLOC_COLD
27 #endif
28
29-#if (defined(__APPLE__) || defined(__FreeBSD__)) && !defined(JEMALLOC_NO_RENAME)
30+#if (defined(__APPLE__) || defined(__FreeBSD__) || (defined(__linux__) && !defined(__GLIBC__))) && !defined(JEMALLOC_NO_RENAME)
31 # define JEMALLOC_SYS_NOTHROW
32 #else
33 # define JEMALLOC_SYS_NOTHROW JEMALLOC_NOTHROW