diff --git a/libs/libc/misc/Kconfig b/libs/libc/misc/Kconfig index 99b13f75fd..4a7635e533 100644 --- a/libs/libc/misc/Kconfig +++ b/libs/libc/misc/Kconfig @@ -62,7 +62,7 @@ config LIBC_ENVPATH Use the contents of the common environment variable to locate executable or library files. Default: n -config MEM_FD_VFS_PATH +config LIBC_MEM_FD_VFS_PATH string "Relative path to memfd storage" default "memfd" depends on FS_TMPFS diff --git a/libs/libc/misc/lib_memfd.c b/libs/libc/misc/lib_memfd.c index 1f05fe5ea8..8675d33e43 100644 --- a/libs/libc/misc/lib_memfd.c +++ b/libs/libc/misc/lib_memfd.c @@ -31,7 +31,8 @@ * Pre-processor Definitions ****************************************************************************/ -#define MEM_FD_VFS_PATH CONFIG_LIBC_TMPDIR "/" CONFIG_MEM_FD_VFS_PATH "/%s" +#define LIBC_MEM_FD_VFS_PATH \ + CONFIG_LIBC_TMPDIR "/" CONFIG_LIBC_MEM_FD_VFS_PATH "/%s" /**************************************************************************** * Public Functions @@ -42,7 +43,7 @@ int memfd_create(FAR const char *name, unsigned int flags) #ifdef CONFIG_FS_TMPFS char path[PATH_MAX]; - snprintf(path, sizeof(path), MEM_FD_VFS_PATH, name); + snprintf(path, sizeof(path), LIBC_MEM_FD_VFS_PATH, name); return open(path, O_RDWR | flags); #else set_errno(ENOSYS);