LibC: Add stubs for shm_* functions

This commit is contained in:
Bananymous 2026-01-06 16:01:57 +02:00
parent 943e3b6f51
commit d0ba52073f
3 changed files with 18 additions and 3 deletions

View File

@ -49,6 +49,7 @@ set(LIBC_SOURCES
sys/mman.cpp
sys/resource.cpp
sys/select.cpp
sys/shm.cpp
sys/socket.cpp
sys/stat.cpp
sys/statvfs.cpp

View File

@ -14,9 +14,12 @@ __BEGIN_DECLS
#include <sys/ipc.h>
#define SHM_RDONLY 0x01
#define SHM_RDONLY 0x02
#define SHM_RDONLY 0x04
#include <unistd.h>
#define SHM_RDONLY 0x01
#define SHM_RND 0x02
#define SHMLBA (sysconf(_SC_PAGE_SIZE))
typedef unsigned int shmatt_t;

View File

@ -0,0 +1,11 @@
#include <BAN/Debug.h>
#include <errno.h>
#include <sys/shm.h>
#define TODO_FUNC(type, name, ...) type name(__VA_ARGS__) { dwarnln("TODO: " #name); errno = ENOTSUP; return (type)-1; }
TODO_FUNC(void*, shmat, int, const void*, int)
TODO_FUNC(int, shmctl, int, int, struct shmid_ds*)
TODO_FUNC(int, shmdt, const void*)
TODO_FUNC(int, shmget, key_t, size_t, int)