This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 7b941a0c8f7ca24fbf9cdedf2cf2a35e88b9eab5 Author: Marco Casaroli <[email protected]> AuthorDate: Wed Nov 11 17:53:32 2026 +0100 libs/libc: Remove a redundant CONFIG_BUILD_FLAT test. A flat build compiles libc without __KERNEL__, with make and with CMake (CMake stopped defining it for libc in a flat build in 9eac74330ae). So "defined(CONFIG_BUILD_FLAT) || !defined(__KERNEL__)" in lib_exit.c and lib_daemon.c is the same as "!defined(__KERNEL__)". Use the short form, as the other user-only files of libc do. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- libs/libc/stdlib/lib_exit.c | 2 +- libs/libc/unistd/lib_daemon.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/libc/stdlib/lib_exit.c b/libs/libc/stdlib/lib_exit.c index 79f54404245..5eb310dec2d 100644 --- a/libs/libc/stdlib/lib_exit.c +++ b/libs/libc/stdlib/lib_exit.c @@ -37,7 +37,7 @@ #include <nuttx/pthread.h> #include <nuttx/lib/elf.h> -#if defined(CONFIG_BUILD_FLAT) || !defined(__KERNEL__) +#ifndef __KERNEL__ /**************************************************************************** * Private Data diff --git a/libs/libc/unistd/lib_daemon.c b/libs/libc/unistd/lib_daemon.c index ff2c8c00702..32bc04a4616 100644 --- a/libs/libc/unistd/lib_daemon.c +++ b/libs/libc/unistd/lib_daemon.c @@ -32,7 +32,7 @@ /* Not appropriate for use within the OS */ -#if defined(CONFIG_BUILD_FLAT) || !defined(__KERNEL__) +#ifndef __KERNEL__ /**************************************************************************** * Public Functions @@ -160,4 +160,4 @@ int daemon(int nochdir, int noclose) return OK; } -#endif /* CONFIG_BUILD_FLAT=y || !__KERNEL__ */ +#endif /* __KERNEL__ */
