summaryrefslogtreecommitdiff
path: root/libc/stdio/vswprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/vswprintf.c')
-rw-r--r--libc/stdio/vswprintf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/stdio/vswprintf.c b/libc/stdio/vswprintf.c
index e509216e9..219524830 100644
--- a/libc/stdio/vswprintf.c
+++ b/libc/stdio/vswprintf.c
@@ -39,6 +39,11 @@ int vswprintf(wchar_t *__restrict buf, size_t size,
__INIT_MBSTATE(&(f.__state));
#endif /* __STDIO_MBSTATE */
+#ifdef __UCLIBC_HAS_THREADS__
+ f.__user_locking = 1; /* Set user locking. */
+ STDIO_INIT_MUTEX(f.__lock);
+#endif /* __UCLIBC_HAS_THREADS__ */
+
f.__nextopen = NULL;
if (size > ((SIZE_MAX - (size_t) buf)/sizeof(wchar_t))) {