X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fstdio%2Fferror.c;h=d692eed9418ea1f0cf36c948bacad20d6afc526c;hp=f535fbeda07ff8ef4f04f04ad17d956001548ce9;hb=c8cb6bcdf009e94c12c6e256b8e24a9bc5fdaf05;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 diff --git a/src/stdio/ferror.c b/src/stdio/ferror.c index f535fbed..d692eed9 100644 --- a/src/stdio/ferror.c +++ b/src/stdio/ferror.c @@ -4,7 +4,11 @@ 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); +weak_alias(ferror, _IO_ferror_unlocked);