about summary refs log tree commit diff
path: root/sysdeps/pthread/flockfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/pthread/flockfile.c')
-rw-r--r--sysdeps/pthread/flockfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/pthread/flockfile.c b/sysdeps/pthread/flockfile.c
index 7fe8e99161..a8e6c28ed9 100644
--- a/sysdeps/pthread/flockfile.c
+++ b/sysdeps/pthread/flockfile.c
@@ -25,6 +25,7 @@
 void
 __flockfile (FILE *stream)
 {
+  stream->_flags2 |= _IO_FLAGS2_NEED_LOCK;
   _IO_lock_lock (*stream->_lock);
 }
 strong_alias (__flockfile, _IO_flockfile)