diff options
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r-- | lib/libc/stdio/ftell.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/stdio/ftell.c b/lib/libc/stdio/ftell.c index 2c8800c..1552485 100644 --- a/lib/libc/stdio/ftell.c +++ b/lib/libc/stdio/ftell.c @@ -97,6 +97,8 @@ _ftello(FILE *fp, fpos_t *offset) * Find offset of underlying I/O object, then * adjust for buffered bytes. */ + if (__sflush(fp)) /* may adjust seek offset on append stream */ + return (1); if (fp->_flags & __SOFF) pos = fp->_offset; else { |