1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:57:45 +00:00

LibCore: Add support for NetBSD in anon_create

This commit is contained in:
nipos 2023-02-20 15:29:50 +00:00 committed by Andreas Kling
parent 9a77934e23
commit f700d553ab
2 changed files with 5 additions and 1 deletions

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) || defined(AK_OS_OPENBSD)
#elif defined(AK_OS_MACOS) || defined(AK_OS_EMSCRIPTEN) || defined(AK_OS_OPENBSD) || defined(AK_OS_NETBSD)
struct timespec time;
clock_gettime(CLOCK_REALTIME, &time);
auto name = DeprecatedString::formatted("/shm-{}{}", (unsigned long)time.tv_sec, (unsigned long)time.tv_nsec);