about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/thread/pthread_cancel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/thread/pthread_cancel.c b/src/thread/pthread_cancel.c
index 1b71aa42..a507f923 100644
--- a/src/thread/pthread_cancel.c
+++ b/src/thread/pthread_cancel.c
@@ -1,3 +1,4 @@
+#include <string.h>
 #include "pthread_impl.h"
 #include "syscall.h"
 #include "libc.h"
@@ -80,7 +81,7 @@ static void init_cancellation()
 		.sa_flags = SA_SIGINFO | SA_RESTART,
 		.sa_sigaction = cancel_handler
 	};
-	sigfillset(&sa.sa_mask);
+	memset(&sa.sa_mask, -1, _NSIG/8);
 	__libc_sigaction(SIGCANCEL, &sa, 0);
 }