temporary fix for musl libc 32-bit compilation on alpine (see issue #895)

This commit is contained in:
Daan 2024-05-16 18:58:18 -07:00
parent e7f2ffe26c
commit e3fea8f4e1

View File

@ -174,7 +174,10 @@ static void* mi_arena_meta_zalloc(size_t size, mi_memid_t* memid, mi_stats_t* st
*memid = _mi_memid_none();
// try static
void* p = mi_arena_static_zalloc(size, MI_MAX_ALIGN_SIZE, memid);
void* p = NULL;
#if !(MI_INTPTR_SIZE==4 && MI_LIBC_MUSL) // fix 32-bit musl compilation, issue #895
p = mi_arena_static_zalloc(size, MI_MAX_ALIGN_SIZE, memid);
#endif
if (p != NULL) return p;
// or fall back to the OS