summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/signal/sigfillset.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/signal/sigfillset.c')
-rw-r--r--libc-top-half/musl/src/signal/sigfillset.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/signal/sigfillset.c b/libc-top-half/musl/src/signal/sigfillset.c
new file mode 100644
index 0000000..16e7b4f
--- /dev/null
+++ b/libc-top-half/musl/src/signal/sigfillset.c
@@ -0,0 +1,18 @@
+#include <signal.h>
+#include <limits.h>
+
+int sigfillset(sigset_t *set)
+{
+#if ULONG_MAX == 0xffffffff
+ set->__bits[0] = 0x7ffffffful;
+ set->__bits[1] = 0xfffffffcul;
+ if (_NSIG > 65) {
+ set->__bits[2] = 0xfffffffful;
+ set->__bits[3] = 0xfffffffful;
+ }
+#else
+ set->__bits[0] = 0xfffffffc7ffffffful;
+ if (_NSIG > 65) set->__bits[1] = 0xfffffffffffffffful;
+#endif
+ return 0;
+}