summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix/src/pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/exec/posix/src/pthread.c')
-rw-r--r--c/src/exec/posix/src/pthread.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/c/src/exec/posix/src/pthread.c b/c/src/exec/posix/src/pthread.c
index 1296af9e70..2f26b5f58e 100644
--- a/c/src/exec/posix/src/pthread.c
+++ b/c/src/exec/posix/src/pthread.c
@@ -450,7 +450,10 @@ int pthread_attr_setstacksize(
if ( !attr || !attr->is_initialized )
return EINVAL;
- attr->stacksize = stacksize;
+ if ( stacksize < STACK_MINIMUM_SIZE )
+ attr->stacksize = STACK_MINIMUM_SIZE;
+ else
+ attr->stacksize = stacksize;
return 0;
}