ftello: return 1 when seeking offset on an append stream.

Obtained from:	Apple Inc. (Libc 997.90.3)
Phabric:	D442
MFC after:	2 weeks
This commit is contained in:
Pedro F. Giffuni 2014-07-22 16:19:01 +00:00
parent c03225695d
commit 4a4e32a81d

View file

@ -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 {