Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 1 | From 1a69d4cc3f97e348dba9714c7ec60da1a8650664 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Tue, 15 Jun 2021 22:05:36 -0700 |
| 4 | Subject: [PATCH] jemalloc_helper: Limit the mm_malloc.h hack to glibc on linux |
| 5 | |
| 6 | Musl does not need this hack |
| 7 | |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 9 | --- |
| 10 | port/jemalloc_helper.h | 2 +- |
| 11 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 12 | |
| 13 | --- a/port/jemalloc_helper.h |
| 14 | +++ b/port/jemalloc_helper.h |
| 15 | @@ -5,7 +5,7 @@ |
| 16 | |
| 17 | #pragma once |
| 18 | |
| 19 | -#if defined(__clang__) |
| 20 | +#if defined(__clang__) && defined(__GLIBC__) |
| 21 | // glibc's `posix_memalign()` declaration specifies `throw()` while clang's |
| 22 | // declaration does not. There is a hack in clang to make its re-declaration |
| 23 | // compatible with glibc's if they are declared consecutively. That hack breaks |