fix fesetround error checking
[musl] / src / thread / pthread_attr_init.c
index d91bf15..463a8d2 100644 (file)
@@ -2,6 +2,10 @@
 
 int pthread_attr_init(pthread_attr_t *a)
 {
-       memset(a, 0, sizeof *a);
+       *a = (pthread_attr_t){0};
+       __acquire_ptc();
+       a->_a_stacksize = __default_stacksize;
+       a->_a_guardsize = __default_guardsize;
+       __release_ptc();
        return 0;
 }