X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fstdio%2Fopen_memstream.c;h=600d27705bf526e696c437845fd4844a8716c30e;hb=3733c831f293b3bbfd0e51faec8ee71112c62c3e;hp=ee834234e5cfa19ccecd3a9f9112c7fa42ff7c7d;hpb=6019459251c58426808f207d18014b6b1f250a59;p=musl diff --git a/src/stdio/open_memstream.c b/src/stdio/open_memstream.c index ee834234..600d2770 100644 --- a/src/stdio/open_memstream.c +++ b/src/stdio/open_memstream.c @@ -2,6 +2,8 @@ #include #include #include +#include +#include "libc.h" struct cookie { char **bufp; @@ -89,6 +91,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;