summaryrefslogtreecommitdiff
path: root/src/thread/pthread_attr_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/pthread_attr_init.c')
-rw-r--r--src/thread/pthread_attr_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/thread/pthread_attr_init.c b/src/thread/pthread_attr_init.c
index d91bf157..66934889 100644
--- a/src/thread/pthread_attr_init.c
+++ b/src/thread/pthread_attr_init.c
@@ -1,7 +1,8 @@
#include "pthread_impl.h"
+#include <string.h>
int pthread_attr_init(pthread_attr_t *a)
{
- memset(a, 0, sizeof *a);
+ *a = (pthread_attr_t){0};
return 0;
}