nsh_fscmd.c:fix "implicit declaration" warning.

Fix error: implicit declaration of function 'nsh_foreach_direntry' [-Werror=implicit-function-declaration] on file nsh_fscmds on some compiler versions.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
chenrun1 2023-07-13 12:13:35 +08:00 committed by Xiang Xiao
parent 415168dde6
commit 046fe00b96
2 changed files with 4 additions and 2 deletions

View File

@ -571,9 +571,9 @@
# undef NSH_HAVE_READFILE # undef NSH_HAVE_READFILE
#endif #endif
/* nsh_foreach_direntry used by the ls and ps commands */ /* nsh_foreach_direntry used by the ls and ps and fdinfo commands */
#if defined(CONFIG_NSH_DISABLE_LS) && defined(CONFIG_NSH_DISABLE_PS) #if defined(CONFIG_NSH_DISABLE_LS) && defined(CONFIG_NSH_DISABLE_PS) && defined(CONFIG_NSH_DISABLE_FDINFO)
# undef NSH_HAVE_FOREACH_DIRENTRY # undef NSH_HAVE_FOREACH_DIRENTRY
#endif #endif

View File

@ -42,6 +42,8 @@
#include <errno.h> #include <errno.h>
#include <debug.h> #include <debug.h>
#include "nsh.h"
#if !defined(CONFIG_DISABLE_MOUNTPOINT) #if !defined(CONFIG_DISABLE_MOUNTPOINT)
# include <sys/mount.h> # include <sys/mount.h>
# include <sys/boardctl.h> # include <sys/boardctl.h>