diff --git a/src/system/libroot/posix/pthread/pthread_attr.c b/src/system/libroot/posix/pthread/pthread_attr.c index f6a15ff5e6c..fecb9fca5b3 100644 --- a/src/system/libroot/posix/pthread/pthread_attr.c +++ b/src/system/libroot/posix/pthread/pthread_attr.c @@ -12,6 +12,8 @@ #include #include +#include + #include @@ -105,6 +107,8 @@ pthread_attr_setstacksize(pthread_attr_t *_attr, size_t stacksize) if (_attr == NULL || (attr = *_attr) == NULL) return B_BAD_VALUE; + STATIC_ASSERT(PTHREAD_STACK_MIN >= MIN_USER_STACK_SIZE + && PTHREAD_STACK_MIN <= MAX_USER_STACK_SIZE); if (stacksize < PTHREAD_STACK_MIN || stacksize > MAX_USER_STACK_SIZE) return B_BAD_VALUE;