mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
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.
This commit is contained in:
parent
b9093dd0ab
commit
9bf2d0b718
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue