about summary refs log tree commit diff
path: root/src/signal/sigemptyset.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-09-16 12:58:51 -0400
committerRich Felker <dalias@aerifal.cx>2013-09-16 12:58:51 -0400
commit0753b1faf002249dc35ef09cb4769d66fa3a1a86 (patch)
treeb59539f1296b74d866893fca6a3a013d2c762605 /src/signal/sigemptyset.c
parentcffb9e1ee2a5e8925845f0c9b79cb6c80487302c (diff)
downloadmusl-0753b1faf002249dc35ef09cb4769d66fa3a1a86.tar.gz
musl-0753b1faf002249dc35ef09cb4769d66fa3a1a86.tar.xz
musl-0753b1faf002249dc35ef09cb4769d66fa3a1a86.zip
fix sigemptyset and sigfillset for mips
they were leaving junk in the upper bits.
Diffstat (limited to 'src/signal/sigemptyset.c')
-rw-r--r--src/signal/sigemptyset.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/signal/sigemptyset.c b/src/signal/sigemptyset.c
index ca9b8920..1d07471d 100644
--- a/src/signal/sigemptyset.c
+++ b/src/signal/sigemptyset.c
@@ -4,6 +4,10 @@
 int sigemptyset(sigset_t *set)
 {
 	set->__bits[0] = 0;
-	if (sizeof(long)==4) set->__bits[1] = 0;
+	if (sizeof(long)==4 || _NSIG > 65) set->__bits[1] = 0;
+	if (sizeof(long)==4 && _NSIG > 65) {
+		set->__bits[2] = 0;
+		set->__bits[3] = 0;
+	}
 	return 0;
 }