summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/fmemopen.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/fmemopen.c
parent3d588fbc9bc229fdd93d6aaf6340583c2bcaca9f (diff)
parentb708fe19431dfeacfe97dbc276190934bd53b483 (diff)
downloadFreeBSD-src-fd9367ff35d3ef67f52f8612ba6df3c487b90f4d.zip
FreeBSD-src-fd9367ff35d3ef67f52f8612ba6df3c487b90f4d.tar.gz
MFhead @ r290899
Diffstat (limited to 'lib/libc/stdio/fmemopen.c')
-rw-r--r--lib/libc/stdio/fmemopen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libc/stdio/fmemopen.c b/lib/libc/stdio/fmemopen.c
index ebd3596..bcf187d 100644
--- a/lib/libc/stdio/fmemopen.c
+++ b/lib/libc/stdio/fmemopen.c
@@ -149,6 +149,9 @@ fmemopen(void * __restrict buf, size_t size, const char * __restrict mode)
return (NULL);
}
+ if (mode[0] == 'a')
+ f->_flags |= __SAPP;
+
/*
* Turn off buffering, so a write past the end of the buffer
* correctly returns a short object count.
OpenPOWER on IntegriCloud