mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 02:13:56 +09:00
LibCore: Port System::anon_create to FreeBSD
FreeBSD implements the Linux API, so this was very simple luckily.
This commit is contained in:
parent
ae4d871183
commit
4bed2ef66b
Notes:
sideshowbarker
2024-07-17 08:46:19 +09:00
Author: https://github.com/BertalanD
Commit: 4bed2ef66b
Pull-request: https://github.com/SerenityOS/serenity/pull/14539
Reviewed-by: https://github.com/ADKaster
1 changed files with 1 additions and 1 deletions
|
@ -286,7 +286,7 @@ ErrorOr<int> anon_create([[maybe_unused]] size_t size, [[maybe_unused]] int opti
|
|||
int fd = -1;
|
||||
#if defined(__serenity__)
|
||||
fd = ::anon_create(round_up_to_power_of_two(size, PAGE_SIZE), options);
|
||||
#elif defined(__linux__)
|
||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||
// FIXME: Support more options on Linux.
|
||||
auto linux_options = ((options & O_CLOEXEC) > 0) ? MFD_CLOEXEC : 0;
|
||||
fd = memfd_create("", linux_options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue