X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_sigmask.c;h=f188782a3277ed6dbcadb1cb8b8af90dc73efbdd;hb=d0b7f9768df133428b6587a5273551c56c46d6a6;hp=b274bd0d8ac19fcb54a3e32a81b2db6fccdc1d6b;hpb=ccc7b4c3a17ade90de71e1e0f44deebbffd646e6;p=musl diff --git a/src/thread/pthread_sigmask.c b/src/thread/pthread_sigmask.c index b274bd0d..f188782a 100644 --- a/src/thread/pthread_sigmask.c +++ b/src/thread/pthread_sigmask.c @@ -1,12 +1,11 @@ #include #include -#include #include "syscall.h" int pthread_sigmask(int how, const sigset_t *restrict set, sigset_t *restrict old) { int ret; - if ((unsigned)how - SIG_BLOCK > 2U) return EINVAL; + if (set && (unsigned)how - SIG_BLOCK > 2U) return EINVAL; ret = -__syscall(SYS_rt_sigprocmask, how, set, old, _NSIG/8); if (!ret && old) { if (sizeof old->__bits[0] == 8) {