X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fstdio%2F__stdio_seek.c;h=326ab9bce48ed38f5f56e059b9312efb0328acbe;hb=68c983919ecfa75a8216d93b85baaefcb7b6e51c;hp=fdb9fe7f2ff086ee364065fa68506c0b6eed1563;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/stdio/__stdio_seek.c b/src/stdio/__stdio_seek.c index fdb9fe7f..326ab9bc 100644 --- a/src/stdio/__stdio_seek.c +++ b/src/stdio/__stdio_seek.c @@ -1,15 +1,7 @@ #include "stdio_impl.h" - -static off_t retneg1(FILE *f, off_t off, int whence) -{ - return -1; -} +#include off_t __stdio_seek(FILE *f, off_t off, int whence) { - off_t ret = __syscall_lseek(f->fd, off, whence); - /* Detect unseekable files and optimize future failures out */ - if (ret < 0 && off == 0 && whence == SEEK_CUR) - f->seek = retneg1; - return ret; + return __lseek(f->fd, off, whence); }