about summary refs log tree commit diff
path: root/libio/ioftell.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/ioftell.c')
-rw-r--r--libio/ioftell.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libio/ioftell.c b/libio/ioftell.c
index 8af2ce7f1f..d49f8c3553 100644
--- a/libio/ioftell.c
+++ b/libio/ioftell.c
@@ -32,7 +32,9 @@ _IO_ftell (fp)
 {
   _IO_pos_t pos;
   CHECK_FILE (fp, -1L);
+  _IO_flockfile (fp);
   pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
+  _IO_funlockfile (fp);
   if (pos == _IO_pos_BAD)
     {
 #ifdef EIO