summaryrefslogtreecommitdiff
path: root/libc/stdio/scanf.c
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2002-04-01 15:16:54 +0000
committerManuel Novoa III <mjn3@codepoet.org>2002-04-01 15:16:54 +0000
commitcecb282ed331701073fd76196ddb734b0f14ec47 (patch)
treee613830df51ddff20c5180f1a8e16ffd1c149bf3 /libc/stdio/scanf.c
parent9f50455ed6e63f92dfa18767a88ffefc6995c21c (diff)
Forget to initialize thread locks for fake files. Thanks Erik.
Diffstat (limited to 'libc/stdio/scanf.c')
-rw-r--r--libc/stdio/scanf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/stdio/scanf.c b/libc/stdio/scanf.c
index 07e74d9ae..a5e0d412c 100644
--- a/libc/stdio/scanf.c
+++ b/libc/stdio/scanf.c
@@ -127,6 +127,10 @@ int vsscanf(__const char *sp, __const char *fmt, va_list ap)
string->bufstart = string->bufrpos = (unsigned char *) ((void *) sp);
string->bufgetc = (char *) ((unsigned) -1);
+#ifdef __STDIO_THREADSAFE
+ __stdio_init_mutex(&string->lock);
+#endif
+
return vfscanf(string, fmt, ap);
}
#else /* __STDIO_BUFFERS */