about summary refs log tree commit diff
path: root/src/signal/sigaltstack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/signal/sigaltstack.c')
-rw-r--r--src/signal/sigaltstack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/signal/sigaltstack.c b/src/signal/sigaltstack.c
index d3a6e821..616625c5 100644
--- a/src/signal/sigaltstack.c
+++ b/src/signal/sigaltstack.c
@@ -1,11 +1,13 @@
 #include <signal.h>
 #include <errno.h>
+#include <unistd.h>
 #include "syscall.h"
 
 int sigaltstack(const stack_t *restrict ss, stack_t *restrict old)
 {
 	if (ss) {
-		if (!(ss->ss_flags & SS_DISABLE) && ss->ss_size < MINSIGSTKSZ) {
+		size_t min = sysconf(_SC_MINSIGSTKSZ);
+		if (!(ss->ss_flags & SS_DISABLE) && ss->ss_size < min) {
 			errno = ENOMEM;
 			return -1;
 		}