1 2 3 4 5 6 7 8 9 10 11
#include <dietstdio.h> #include <unistd.h> long 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)); }