aboutsummaryrefslogtreecommitdiff
path: root/lib/libc_r/uthread/uthread_sigmask.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/uthread/uthread_sigmask.c')
-rw-r--r--lib/libc_r/uthread/uthread_sigmask.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libc_r/uthread/uthread_sigmask.c b/lib/libc_r/uthread/uthread_sigmask.c
index 514f8fa750e5..b880d9c748c8 100644
--- a/lib/libc_r/uthread/uthread_sigmask.c
+++ b/lib/libc_r/uthread/uthread_sigmask.c
@@ -31,6 +31,9 @@
*
* $FreeBSD$
*/
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/signalvar.h>
#include <errno.h>
#include <signal.h>
#ifdef _THREAD_SAFE
@@ -54,13 +57,13 @@ pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
/* Block signals: */
case SIG_BLOCK:
/* Add signals to the existing mask: */
- _thread_run->sigmask |= *set;
+ SIGSETOR(_thread_run->sigmask, *set);
break;
/* Unblock signals: */
case SIG_UNBLOCK:
/* Clear signals from the existing mask: */
- _thread_run->sigmask &= ~(*set);
+ SIGSETNAND(_thread_run->sigmask, *set);
break;
/* Set the signal process mask: */