drivers/rptun: guard nxsched_waitpid with CONFIG_SCHED_WAITPID

nxsched_waitpid is only available when CONFIG_SCHED_WAITPID is
enabled. Wrap the call with #ifdef to fix the build error when
this option is disabled.

Signed-off-by: huojianchao <huojianchao@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
Bowen Wang
2025-12-25 21:02:03 +08:00
committed by Lup Yuen Lee
parent 960bd97bb0
commit 426a5154d9
+2
View File
@@ -932,7 +932,9 @@ static int rptun_dev_stop(FAR struct remoteproc *rproc)
{
priv->stop = true;
nxsig_kill(priv->pid, SIGKILL);
#ifdef CONFIG_SCHED_WAITPID
nxsched_waitpid(priv->pid, NULL, WEXITED);
#endif
priv->stop = false;
priv->pid = -EINVAL;
}