summaryrefslogtreecommitdiff
path: root/AK
diff options
context:
space:
mode:
authorkleines Filmröllchen <malu.bertsch@gmail.com>2022-01-12 23:24:57 +0100
committerLinus Groh <mail@linusgroh.de>2022-01-13 11:17:44 +0100
commit9bf2d0b71860c03939944c2175956435b60871fa (patch)
treee39c12e711fa255e782d0ab345808b892e702c0d /AK
parentb9093dd0abac81d750ee19a229f185fff0c9af8e (diff)
downloadserenity-9bf2d0b71860c03939944c2175956435b60871fa.zip
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.
Diffstat (limited to 'AK')
-rw-r--r--AK/NoAllocationGuard.h9
1 files 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
}