diff --git a/porting/liteos_m/kernel/src/stdio/ftell.c b/porting/liteos_m/kernel/src/stdio/ftell.c index d15cc665275f1d5eead43a5ac3535afd6ad46d95..8cf4252b545f2441d5f9c8e91dfd071a8aa69a22 100644 --- a/porting/liteos_m/kernel/src/stdio/ftell.c +++ b/porting/liteos_m/kernel/src/stdio/ftell.c @@ -4,7 +4,7 @@ off_t __ftello_unlocked(FILE *f) { - off_t pos = lseek(f->fd, 0, + off_t pos = lseek(f->fd, (off_t)0, (f->flags & F_APP) && f->wpos != f->wbase ? SEEK_END : SEEK_CUR); if (pos < 0) return pos;