about summary refs log tree commit diff
path: root/libio/vasprintf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/vasprintf.c')
-rw-r--r--libio/vasprintf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libio/vasprintf.c b/libio/vasprintf.c
index cf50603f0d..57a3b08eba 100644
--- a/libio/vasprintf.c
+++ b/libio/vasprintf.c
@@ -38,12 +38,16 @@ _IO_vasprintf (result_ptr, format, args)
   const _IO_size_t init_string_size = 100;
   char *string;
   _IO_strfile sf;
+#ifdef _IO_MTSAFE_IO
   _IO_lock_t lock;
+#endif
   int ret;
   string = ALLOC_BUF(init_string_size);
   if (string == NULL)
     return -1;
+#ifdef _IO_MTSAFE_IO
   sf._f._lock = &lock;
+#endif
   _IO_init((_IO_FILE*)&sf, 0);
   _IO_JUMPS((_IO_FILE*)&sf) = &_IO_str_jumps;
   _IO_str_init_static ((_IO_FILE*)&sf, string, init_string_size, string);