LibCore: Use BSD implementation of anon_create() on Haiku

This commit is contained in:
nipos 2023-08-29 12:51:50 +02:00 committed by Andrew Kaster
parent 45e38c99c2
commit 0dfd6994e3
Notes: sideshowbarker 2024-07-19 16:50:39 +09:00

View File

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