diff options
Diffstat (limited to 'mdk-stage1/dietlibc/libstdio/fseek.c')
-rw-r--r-- | mdk-stage1/dietlibc/libstdio/fseek.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mdk-stage1/dietlibc/libstdio/fseek.c b/mdk-stage1/dietlibc/libstdio/fseek.c index 5bb96bc6e..a49230f0a 100644 --- a/mdk-stage1/dietlibc/libstdio/fseek.c +++ b/mdk-stage1/dietlibc/libstdio/fseek.c @@ -1,11 +1,10 @@ #include <dietstdio.h> #include <unistd.h> -long fseek(FILE *stream, long offset, int whence) { +int fseek(FILE *stream, long offset, int whence) { fflush(stream); -#ifdef WANT_BUFFERED_STDIO stream->bm=0; stream->bs=0; -#endif stream->flags&=~(ERRORINDICATOR|EOFINDICATOR); - return (lseek(stream->fd,offset,whence)); + stream->ungotten=0; + return lseek(stream->fd,offset,whence)!=-1?0:-1; } |