From a60aa668f373644a033925ff8f401d2fe9cce5a8 Mon Sep 17 00:00:00 2001 From: hujun5 Date: Sun, 8 Oct 2023 14:52:51 +0800 Subject: [PATCH] lib_memfd: turn a runtime error into a linker error Signed-off-by: hujun5 --- libs/libc/misc/lib_memfd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/libc/misc/lib_memfd.c b/libs/libc/misc/lib_memfd.c index 98046b753afa5..d53ed4f52d469 100644 --- a/libs/libc/misc/lib_memfd.c +++ b/libs/libc/misc/lib_memfd.c @@ -29,6 +29,7 @@ #include #include +#if defined(CONFIG_LIBC_MEMFD_TMPFS) || defined(CONFIG_LIBC_MEMFD_SHMFS) /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -73,3 +74,4 @@ int memfd_create(FAR const char *name, unsigned int flags) return ret; #endif } +#endif \ No newline at end of file