fix broken spinlock due to miscompilation
[oweals/musl.git] / src / thread / pthread_attr_setstacksize.c
index df16b980886e54c2581c4004e811fcc45c17df19..e4de5208eeba54935a881b10b3366ad8df88392d 100644 (file)
@@ -2,7 +2,7 @@
 
 int pthread_attr_setstacksize(pthread_attr_t *a, size_t size)
 {
-       if (size-PAGE_SIZE > SIZE_MAX/4) return EINVAL;
+       if (size-PTHREAD_STACK_MIN > SIZE_MAX/4) return EINVAL;
        a->_a_stacksize = size - DEFAULT_STACK_SIZE;
        return 0;
 }