aboutsummaryrefslogtreecommitdiff
path: root/libio/fseek.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/fseek.c')
-rw-r--r--libio/fseek.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libio/fseek.c b/libio/fseek.c
index 3afc4283e6..5255e9defe 100644
--- a/libio/fseek.c
+++ b/libio/fseek.c
@@ -31,6 +31,10 @@ fseek (fp, offset, whence)
long int offset;
int whence;
{
+ int result;
CHECK_FILE (fp, -1);
- return _IO_fseek (fp, offset, whence);
+ flockfile (fp);
+ result = _IO_fseek (fp, offset, whence);
+ funlockfile (fp);
+ return result;
}