From 9bf2d0b71860c03939944c2175956435b60871fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Wed, 12 Jan 2022 23:24:57 +0100 Subject: [PATCH] AK: Disable NoAllocationGuard on Lagom Because we don't have our LibC on Lagom, the allocation guard global flag doesn't exist and NoAllocationGuard fails to build on Lagom. Whoops. For now, just disable NoAllocationGuard's functionality here. --- AK/NoAllocationGuard.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/AK/NoAllocationGuard.h b/AK/NoAllocationGuard.h index 5778f7fd85..19356541dd 100644 --- a/AK/NoAllocationGuard.h +++ b/AK/NoAllocationGuard.h @@ -39,8 +39,11 @@ private: { #if defined(KERNEL) return Processor::current_thread()->get_allocation_enabled(); -#else +#elif defined(__serenity__) + // This extern thread-local lives in our LibC, which doesn't exist on other systems. return s_allocation_enabled; +#else + return true; #endif } @@ -48,8 +51,10 @@ private: { #if defined(KERNEL) Processor::current_thread()->set_allocation_enabled(value); -#else +#elif defined(__serenity__) s_allocation_enabled = value; +#else + (void)value; #endif }