about summary refs log tree commit diff
path: root/src/signal/sigsetjmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/signal/sigsetjmp.c')
-rw-r--r--src/signal/sigsetjmp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/signal/sigsetjmp.c b/src/signal/sigsetjmp.c
index 5c937074..01ba0dff 100644
--- a/src/signal/sigsetjmp.c
+++ b/src/signal/sigsetjmp.c
@@ -9,9 +9,7 @@
 
 int sigsetjmp(sigjmp_buf buf, int save)
 {
-	unsigned long *flag = buf + sizeof(jmp_buf)/sizeof(long);
-	sigset_t *mask = (void *)(flag + 1);
-	if ((*flag = save))
-		sigprocmask (SIG_SETMASK, NULL, mask);
-	return setjmp((void *)buf);
+	if ((buf->__fl = save))
+		pthread_sigmask(SIG_SETMASK, 0, (sigset_t *)buf->__ss);
+	return setjmp(buf->__jb);
 }