diff options
author | pfg <pfg@FreeBSD.org> | 2014-07-22 16:19:01 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2014-07-22 16:19:01 +0000 |
commit | e0b7f18a537606e35fce0c30a67f5914f676ae52 (patch) | |
tree | 25cf1f3764f2bd4f84be7a2fabc4ee763f3f7955 /lib/libc | |
parent | 96faf15ff009431d95f6b86f4f203a71df6a0448 (diff) | |
download | FreeBSD-src-e0b7f18a537606e35fce0c30a67f5914f676ae52.zip FreeBSD-src-e0b7f18a537606e35fce0c30a67f5914f676ae52.tar.gz |
ftello: return 1 when seeking offset on an append stream.
Obtained from: Apple Inc. (Libc 997.90.3)
Phabric: D442
MFC after: 2 weeks
Diffstat (limited to 'lib/libc')
-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 { |