summaryrefslogtreecommitdiff
path: root/libio/feof.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/feof.c')
-rw-r--r--libio/feof.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libio/feof.c b/libio/feof.c
index 9712a81e78..8890a5f51f 100644
--- a/libio/feof.c
+++ b/libio/feof.c
@@ -32,6 +32,8 @@ _IO_feof (_IO_FILE *fp)
{
int result;
CHECK_FILE (fp, EOF);
+ if (!_IO_need_lock (fp))
+ return _IO_feof_unlocked (fp);
_IO_flockfile (fp);
result = _IO_feof_unlocked (fp);
_IO_funlockfile (fp);