From 2600c3116ce27a84b7915a5175ce8d25904f20dc Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Mon, 2 Sep 2024 01:44:35 +0200 Subject: [PATCH] Do not add the libc allocator if it isn't available. --- lib/std/core/allocators/libc_allocator.c3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/core/allocators/libc_allocator.c3 b/lib/std/core/allocators/libc_allocator.c3 index f8e518b23..8389c6c19 100644 --- a/lib/std/core/allocators/libc_allocator.c3 +++ b/lib/std/core/allocators/libc_allocator.c3 @@ -110,7 +110,7 @@ fn void LibcAllocator.release(&self, void* old_ptr, bool aligned) @dynamic libc::free(old_ptr); } -module std::core::mem::allocator @if(!env::WIN32 && !env::POSIX && !env::WASM_NOLIBC); +module std::core::mem::allocator @if(!env::WIN32 && !env::POSIX && env::LIBC); import libc; fn void*! LibcAllocator.acquire(&self, usz bytes, AllocInitType init_type, usz alignment) @dynamic