mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +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
Notes:
sideshowbarker
2024-07-17 21:00:34 +09:00
Author: https://github.com/kleinesfilmroellchen Commit: https://github.com/SerenityOS/serenity/commit/9bf2d0b7186 Pull-request: https://github.com/SerenityOS/serenity/pull/11844 Reviewed-by: https://github.com/bgianfo Reviewed-by: https://github.com/linusg
1 changed files with 7 additions and 2 deletions
|
@ -39,8 +39,11 @@ private:
|
||||||
{
|
{
|
||||||
#if defined(KERNEL)
|
#if defined(KERNEL)
|
||||||
return Processor::current_thread()->get_allocation_enabled();
|
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;
|
return s_allocation_enabled;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,8 +51,10 @@ private:
|
||||||
{
|
{
|
||||||
#if defined(KERNEL)
|
#if defined(KERNEL)
|
||||||
Processor::current_thread()->set_allocation_enabled(value);
|
Processor::current_thread()->set_allocation_enabled(value);
|
||||||
#else
|
#elif defined(__serenity__)
|
||||||
s_allocation_enabled = value;
|
s_allocation_enabled = value;
|
||||||
|
#else
|
||||||
|
(void)value;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue