This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit dd88c7fcfac1a6439a7b7ce97352cf15bcfcd6fd
Author: ouyangxiangzhen <[email protected]>
AuthorDate: Thu Jul 11 16:43:49 2024 +0800

    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 <[email protected]>
---
 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

Reply via email to