diff --git a/include/sys/syscall.h b/include/sys/syscall.h index 823d88b4eb..bea4a25b43 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -141,7 +141,7 @@ /* The following can be individually enabled */ -#ifdef CONFIG_ARCH_HAVE_VFORK +#if defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_ARCH_HAVE_VFORK) # define SYS_vfork __SYS_vfork # define __SYS_atexit (__SYS_vfork + 1) #else diff --git a/syscall/syscall.csv b/syscall/syscall.csv index 6001747209..8e817e1fe7 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -177,7 +177,7 @@ "unsetenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","const char*" "up_assert","assert.h","","void","FAR const uint8_t*","int" #"up_assert","assert.h","","void" -"vfork","unistd.h","defined(CONFIG_ARCH_HAVE_VFORK)","pid_t" +"vfork","unistd.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_ARCH_HAVE_VFORK)","pid_t" "wait","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","pid_t","int*" "waitid","sys/wait.h","defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)","int","idtype_t","id_t"," FAR siginfo_t *","int" "waitpid","sys/wait.h","defined(CONFIG_SCHED_WAITPID)","pid_t","pid_t","int*","int" diff --git a/syscall/syscall_lookup.h b/syscall/syscall_lookup.h index 99fdfb6aeb..cb748f778b 100644 --- a/syscall/syscall_lookup.h +++ b/syscall/syscall_lookup.h @@ -96,7 +96,7 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert) /* The following can be individually enabled */ -#ifdef CONFIG_ARCH_HAVE_VFORK +#if defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_ARCH_HAVE_VFORK) SYSCALL_LOOKUP(vfork, 0, STUB_vfork) #endif