LibCore: On OpenBSD, handle anon_create() like on MacOS

This commit is contained in:
nipos 2023-01-14 16:08:26 +01:00 committed by Andreas Kling
commit b510747e22
Notes: sideshowbarker 2024-07-19 16:59:32 +09:00

View file

@ -403,7 +403,7 @@ ErrorOr<int> anon_create([[maybe_unused]] size_t size, [[maybe_unused]] int opti
TRY(close(fd));
return Error::from_errno(saved_errno);
}
#elif defined(AK_OS_MACOS) || defined(AK_OS_EMSCRIPTEN)
#elif defined(AK_OS_MACOS) || defined(AK_OS_EMSCRIPTEN) || defined(AK_OS_OPENBSD)
struct timespec time;
clock_gettime(CLOCK_REALTIME, &time);
auto name = DeprecatedString::formatted("/shm-{}{}", (unsigned long)time.tv_sec, (unsigned long)time.tv_nsec);