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 6e9c0a05eba698bd422410a8112de2de26621cb7
Author: Marco Casaroli <[email protected]>
AuthorDate: Wed Oct 28 10:38:12 2026 +0100

    fs/vfs: Build epoll_pwait() without signals.
    
    epoll_pwait() sets the signal mask with nxsig_procmask() while it waits.
    With CONFIG_DISABLE_ALL_SIGNALS nxsig_procmask() is not built, so a
    build that links epoll_pwait() fails.  A protected build always links
    it, through its system call:
    
      fs_epoll.c:769: undefined reference to `nxsig_procmask'
    
    Without signals there is no signal mask: set it only when signals are
    enabled.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 fs/vfs/fs_epoll.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/fs/vfs/fs_epoll.c b/fs/vfs/fs_epoll.c
index a17eaa0393f..a89b918ab04 100644
--- a/fs/vfs/fs_epoll.c
+++ b/fs/vfs/fs_epoll.c
@@ -748,7 +748,9 @@ int epoll_pwait(int epfd, FAR struct epoll_event *evs,
 {
   FAR struct file *filep;
   FAR epoll_head_t *eph;
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
   sigset_t oldsigmask;
+#endif
   int ret;
 
   eph = epoll_head_from_fd(epfd, &filep);
@@ -764,9 +766,11 @@ retry:
       goto err;
     }
 
-  /* Wait the poll ready */
+  /* Wait the poll ready.  Without signals, there is no mask to set. */
 
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
   nxsig_procmask(SIG_SETMASK, sigmask, &oldsigmask);
+#endif
 
   /* Push a cancellation point onto the stack.  This will be called if
    * the thread is canceled.
@@ -791,7 +795,9 @@ retry:
 
   tls_cleanup_pop(tls_get_info(), 0);
 
+#ifndef CONFIG_DISABLE_ALL_SIGNALS
   nxsig_procmask(SIG_SETMASK, &oldsigmask, NULL);
+#endif
   if (ret < 0 && ret != -ETIMEDOUT)
     {
       goto err;

Reply via email to