diff options
Diffstat (limited to 'src/stdio/ferror.c')
-rw-r--r-- | src/stdio/ferror.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/stdio/ferror.c b/src/stdio/ferror.c index 8288a93d..d692eed9 100644 --- a/src/stdio/ferror.c +++ b/src/stdio/ferror.c @@ -4,7 +4,10 @@ int ferror(FILE *f) { - return !!(f->flags & F_ERR); + FLOCK(f); + int ret = !!(f->flags & F_ERR); + FUNLOCK(f); + return ret; } weak_alias(ferror, ferror_unlocked); |