From dd88c7fcfac1a6439a7b7ce97352cf15bcfcd6fd Mon Sep 17 00:00:00 2001 From: ouyangxiangzhen Date: Thu, 11 Jul 2024 16:43:49 +0800 Subject: [PATCH] sys/mman: Add dummy implementations of shm_open and shm_unlink This patch added dummy implementations of shm_open and shm_unlink. Signed-off-by: ouyangxiangzhen --- include/sys/mman.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/sys/mman.h b/include/sys/mman.h index 75d7ff3aef..3a4c5f7e26 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -212,8 +212,13 @@ int posix_mem_offset(FAR const void *addr, size_t len, FAR off_t *off, int posix_typed_mem_get_info(int fildes, FAR struct posix_typed_mem_info *info); int posix_typed_mem_open(FAR const char *name, int oflag, int tflag); +#ifdef CONFIG_FS_SHMFS int shm_open(FAR const char *name, int oflag, mode_t mode); int shm_unlink(FAR const char *name); +#else +#define shm_open(...) (-ENOSYS) +#define shm_unlink(...) (-ENOSYS) +#endif int memfd_create(FAR const char *name, unsigned int flags); #undef EXTERN