OSDN Git Service

- Fix __user_locking with stdio buffers (Carmelo AMOROSO)
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 2 Nov 2008 12:13:00 +0000 (12:13 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 2 Nov 2008 12:13:00 +0000 (12:13 -0000)
  Closes #5254

libc/stdio/vsnprintf.c

index e5a14d5..f7d2349 100644 (file)
@@ -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