From a84c3480456bd0674064db59c9b54490c883fac0 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Thu, 7 Aug 2025 04:22:54 +0300 Subject: [PATCH] LibC: Add shm_{open,unlink} stubs These are needed for our llvm port --- userspace/libraries/LibC/sys/mman.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/userspace/libraries/LibC/sys/mman.cpp b/userspace/libraries/LibC/sys/mman.cpp index eb4d65ab..ebc4b3c7 100644 --- a/userspace/libraries/LibC/sys/mman.cpp +++ b/userspace/libraries/LibC/sys/mman.cpp @@ -45,8 +45,28 @@ int posix_madvise(void* addr, size_t len, int advice) } #include +#include +#include int mlock(const void*, size_t) { ASSERT_NOT_REACHED(); } + +int shm_open(const char* name, int oflag, mode_t mode) +{ + (void)name; + (void)oflag; + (void)mode; + dwarnln("TODO: shm_open"); + errno = ENOTSUP; + return -1; +} + +int shm_unlink(const char* name) +{ + (void)name; + dwarnln("TODO: shm_unlink"); + errno = ENOTSUP; + return -1; +}