aboutsummaryrefslogtreecommitdiff
path: root/libio/iofgetpos.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iofgetpos.c')
-rw-r--r--libio/iofgetpos.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c
index bc2215fc01..50014765f9 100644
--- a/libio/iofgetpos.c
+++ b/libio/iofgetpos.c
@@ -33,7 +33,9 @@ _IO_fgetpos (fp, posp)
{
_IO_fpos_t pos;
CHECK_FILE (fp, EOF);
+ _IO_flockfile (fp);
pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0);
+ _IO_funlockfile (fp);
if (pos == _IO_pos_BAD)
{
#ifdef EIO