summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdio/fseek.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/fseek.c')
-rw-r--r--newlib/libc/stdio/fseek.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/newlib/libc/stdio/fseek.c b/newlib/libc/stdio/fseek.c
index d22292e97..1b7298914 100644
--- a/newlib/libc/stdio/fseek.c
+++ b/newlib/libc/stdio/fseek.c
@@ -278,6 +278,7 @@ fseek (fp, offset, whence)
if ((*seekfn) (fp->_cookie, curoff, SEEK_SET) == POS_ERR)
goto dumb;
fp->_r = 0;
+ fp->_p = fp->_bf._base;
if (HASUB (fp))
FREEUB (fp);
fp->_flags &= ~__SEOF;