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-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 43d634ce0 nsh/fsutils: fix build break if CONFIG_NSH_DISABLE_PKILL not 
disabled
43d634ce0 is described below

commit 43d634ce00f39d516f79eea10b1fcd9882cada35
Author: chao an <anc...@lixiang.com>
AuthorDate: Sat Oct 12 14:59:29 2024 +0800

    nsh/fsutils: fix build break if CONFIG_NSH_DISABLE_PKILL not disabled
    
    arm-none-eabi/bin/ld: apps/libapps.a(nsh_proccmds.c.obj): in function 
`cmd_pkill':
    apps/nshlib/nsh_proccmds.c:861:(.text.cmd_pkill+0x38): undefined reference 
to `nsh_getpid'
    
    Signed-off-by: chao an <anc...@lixiang.com>
---
 nshlib/nsh.h         | 2 +-
 nshlib/nsh_fsutils.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/nshlib/nsh.h b/nshlib/nsh.h
index f6fb38f9a..35f2d20a3 100644
--- a/nshlib/nsh.h
+++ b/nshlib/nsh.h
@@ -1394,7 +1394,7 @@ int nsh_foreach_direntry(FAR struct nsh_vtbl_s *vtbl, FAR 
const char *cmd,
  *
  ****************************************************************************/
 
-#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_NSH_DISABLE_PIDOF)
+#ifdef CONFIG_FS_PROCFS
 ssize_t nsh_getpid(FAR struct nsh_vtbl_s *vtbl, FAR const char *name,
                    FAR pid_t *pids, size_t count);
 #endif
diff --git a/nshlib/nsh_fsutils.c b/nshlib/nsh_fsutils.c
index 309f24dc2..30c2a19e9 100644
--- a/nshlib/nsh_fsutils.c
+++ b/nshlib/nsh_fsutils.c
@@ -63,7 +63,7 @@ struct getpid_arg_s
  *
  ****************************************************************************/
 
-#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_NSH_DISABLE_PIDOF)
+#ifdef CONFIG_FS_PROCFS
 static int getpid_callback(FAR struct nsh_vtbl_s *vtbl,
                            FAR const char *dirpath,
                            FAR struct dirent *entryp, FAR void *pvarg)
@@ -604,7 +604,7 @@ FAR char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl,
  *
  ****************************************************************************/
 
-#if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_NSH_DISABLE_PIDOF)
+#ifdef CONFIG_FS_PROCFS
 ssize_t nsh_getpid(FAR struct nsh_vtbl_s *vtbl, FAR const char *name,
                    FAR pid_t *pids, size_t count)
 {

Reply via email to