summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fopen.c
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2015-11-16 02:00:12 +0000
committerngie <ngie@FreeBSD.org>2015-11-16 02:00:12 +0000
commitfd9367ff35d3ef67f52f8612ba6df3c487b90f4d (patch)
tree68c676723f5f9cd1d66be903cfdce6b37dcc3719 /lib/libc/stdio/fopen.c
parent3d588fbc9bc229fdd93d6aaf6340583c2bcaca9f (diff)
parentb708fe19431dfeacfe97dbc276190934bd53b483 (diff)
downloadFreeBSD-src-fd9367ff35d3ef67f52f8612ba6df3c487b90f4d.zip
FreeBSD-src-fd9367ff35d3ef67f52f8612ba6df3c487b90f4d.tar.gz
MFhead @ r290899
Diffstat (limited to 'lib/libc/stdio/fopen.c')
-rw-r--r--lib/libc/stdio/fopen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/stdio/fopen.c b/lib/libc/stdio/fopen.c
index b08e336..9ab61ba 100644
--- a/lib/libc/stdio/fopen.c
+++ b/lib/libc/stdio/fopen.c
@@ -91,7 +91,9 @@ fopen(const char * __restrict file, const char * __restrict mode)
* we can do about this. (We could set __SAPP and check in
* fseek and ftell.)
*/
- if (oflags & O_APPEND)
+ if (oflags & O_APPEND) {
+ fp->_flags2 |= __S2OAP;
(void)_sseek(fp, (fpos_t)0, SEEK_END);
+ }
return (fp);
}
OpenPOWER on IntegriCloud