summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/stdio/open_memstream.c1
-rw-r--r--src/stdio/open_wmemstream.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/stdio/open_memstream.c b/src/stdio/open_memstream.c
index ee834234..40f5ad60 100644
--- a/src/stdio/open_memstream.c
+++ b/src/stdio/open_memstream.c
@@ -89,6 +89,7 @@ FILE *open_memstream(char **bufp, size_t *sizep)
f->f.write = ms_write;
f->f.seek = ms_seek;
f->f.close = ms_close;
+ f->f.mode = -1;
if (!libc.threaded) f->f.lock = -1;
diff --git a/src/stdio/open_wmemstream.c b/src/stdio/open_wmemstream.c
index cb693ea7..a7c3a645 100644
--- a/src/stdio/open_wmemstream.c
+++ b/src/stdio/open_wmemstream.c
@@ -94,5 +94,7 @@ FILE *open_wmemstream(wchar_t **bufp, size_t *sizep)
if (!libc.threaded) f->f.lock = -1;
+ fwide(&f->f, 1);
+
return __ofl_add(&f->f);
}