You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/10/11 15:39:46 UTC
[nuttx] branch master updated: lib_memfd: turn a runtime error into a linker error
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
The following commit(s) were added to refs/heads/master by this push:
new 99eeaafd07 lib_memfd: turn a runtime error into a linker error
99eeaafd07 is described below
commit 99eeaafd07e2456a8b264ab7cbe2057460f84ca9
Author: hujun5 <hu...@xiaomi.com>
AuthorDate: Sun Oct 8 14:52:51 2023 +0800
lib_memfd: turn a runtime error into a linker error
Signed-off-by: hujun5 <hu...@xiaomi.com>
---
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 98046b753a..d53ed4f52d 100644
--- a/libs/libc/misc/lib_memfd.c
+++ b/libs/libc/misc/lib_memfd.c
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <unistd.h>
+#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