diff --git a/configure b/configure index 36184a58ad..742cb7c533 100755 --- a/configure +++ b/configure @@ -864,7 +864,8 @@ cat > $TMPC < /* pthread_sigmask() */ int main(void) { - return pthread_sigmask(0, NULL, NULL); + sigset_t sigmask; + return pthread_sigmask(0, NULL, &sigmask); } EOF if compile_prog "" "$LIBS" "pthread_sigmask" ; then diff --git a/helper_thread.c b/helper_thread.c index 53dea44bab..2a9dabf5f7 100644 --- a/helper_thread.c +++ b/helper_thread.c @@ -106,13 +106,14 @@ static int read_from_pipe(int fd, void *buf, size_t len) static void block_signals(void) { -#ifdef HAVE_PTHREAD_SIGMASK +#ifdef CONFIG_PTHREAD_SIGMASK sigset_t sigmask; + int ret; + ret = pthread_sigmask(SIG_UNBLOCK, NULL, &sigmask); assert(ret == 0); ret = pthread_sigmask(SIG_BLOCK, &sigmask, NULL); - assert(ret == 0); #endif }