Browse Source

- Fix __user_locking with stdio buffers (Carmelo AMOROSO)
Closes #5254

Bernhard Reutner-Fischer 15 years ago
parent
commit
e0d1b83cf8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libc/stdio/vsnprintf.c

+ 1 - 1
libc/stdio/vsnprintf.c

@@ -46,7 +46,7 @@ int vsnprintf(char *__restrict buf, size_t size,
 	__INIT_MBSTATE(&(f.__state));
 #endif /* __STDIO_MBSTATE */
 
-#if defined(__USE_OLD_VFPRINTF__) && defined(__UCLIBC_HAS_THREADS__)
+#if (defined(__STDIO_BUFFERS) || defined(__USE_OLD_VFPRINTF__)) && defined(__UCLIBC_HAS_THREADS__)
 	f.__user_locking = 1;		/* Set user locking. */
 	__stdio_init_mutex(&f.__lock);
 #endif