diff --git a/libs/libc/misc/lib_memfd.c b/libs/libc/misc/lib_memfd.c index 828874d7fc..98db24fa43 100644 --- a/libs/libc/misc/lib_memfd.c +++ b/libs/libc/misc/lib_memfd.c @@ -23,6 +23,7 @@ ****************************************************************************/ #include +#include #include #include #include @@ -56,6 +57,7 @@ int memfd_create(FAR const char *name, unsigned int flags) # ifdef CONFIG_LIBC_MEMFD_SHMFS return shm_open(path, O_RDWR | flags, 0660); # else + mkdir(LIBC_MEM_FD_VFS_PATH, 0666); return open(path, O_RDWR | flags, 0660); # endif #endif