mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
LibCore: Add support for NetBSD in anon_create
This commit is contained in:
parent
9a77934e23
commit
f700d553ab
Notes:
sideshowbarker
2024-07-19 16:56:19 +09:00
Author: https://github.com/ghost Commit: https://github.com/SerenityOS/serenity/commit/f700d553abb Pull-request: https://github.com/SerenityOS/serenity/pull/17549
2 changed files with 5 additions and 1 deletions
|
@ -333,6 +333,10 @@ install(TARGETS LibC LibCrypt LibSystem NoCoverage EXPORT LagomTargets)
|
|||
add_serenity_subdirectory(AK)
|
||||
add_serenity_subdirectory(Userland/Libraries/LibCore)
|
||||
target_link_libraries(LibCore PRIVATE Threads::Threads)
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
||||
# NetBSD has its shm_open and shm_unlink functions in librt so we need to link that
|
||||
target_link_libraries(LibCore PRIVATE librt.so)
|
||||
endif()
|
||||
target_sources(LibCore PRIVATE ${AK_SOURCES})
|
||||
|
||||
# LibMain
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue