On 2026-04-04 I wrote:
> 0001: The test-pthread_sigmask1 test currently does not fail on NetBSD.

It does fail in a GNU gettext build, though. This patch adds a local
workaround. A global workaround would require more complexity than I like.


2026-05-02  Bruno Haible  <[email protected]>

        pthread_sigmask tests: Fix a build failure on NetBSD.
        * lib/pthread_sigmask.c (pthread_sigmask): Work around a NetBSD bug.

diff --git a/lib/pthread_sigmask.c b/lib/pthread_sigmask.c
index ee2f8c0f5c..7a21ec76a2 100644
--- a/lib/pthread_sigmask.c
+++ b/lib/pthread_sigmask.c
@@ -75,7 +75,9 @@ pthread_sigmask (int how, const sigset_t *new_mask, sigset_t 
*old_mask)
   return ret;
 # else
   int ret = sigprocmask (how, new_mask, old_mask);
-  return (ret < 0 ? errno : 0);
+  /* Test for ret != 0, not ret < 0, as a workaround against NetBSD bug
+     <https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=57213>.  */
+  return (ret != 0 ? errno : 0);
 # endif
 }
 




Reply via email to