diff options
Diffstat (limited to 'libio/memstream.c')
-rw-r--r-- | libio/memstream.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libio/memstream.c b/libio/memstream.c index f83d4a5213..e391efd48a 100644 --- a/libio/memstream.c +++ b/libio/memstream.c @@ -96,6 +96,9 @@ __open_memstream (char **bufloc, _IO_size_t *sizeloc) new_f->fp.bufloc = bufloc; new_f->fp.sizeloc = sizeloc; + /* Disable single thread optimization. BZ 21735. */ + new_f->fp._sf._sbf._f._flags2 |= _IO_FLAGS2_NEED_LOCK; + return (_IO_FILE *) &new_f->fp._sf._sbf; } libc_hidden_def (__open_memstream) |