X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2Frewind.c;h=6f4b58b5468900cab60ca6e28c494ac2eea1c645;hb=e8dbf00a789e3b56ca6c3d88e8048b7b2c18b797;hp=7944b434d8174ff32789ce4e00bd0bb4271a09f4;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/stdio/rewind.c b/src/stdio/rewind.c index 7944b434..6f4b58b5 100644 --- a/src/stdio/rewind.c +++ b/src/stdio/rewind.c @@ -1,6 +1,9 @@ -#include +#include "stdio_impl.h" void rewind(FILE *f) { - fseek(f, 0, SEEK_SET); + FLOCK(f); + __fseeko_unlocked(f, 0, SEEK_SET); + f->flags &= ~F_ERR; + FUNLOCK(f); }