X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=include%2Fbabeltrace%2Fcompat%2Fmemstream-internal.h;h=0b35330eb5693014a7c34da7b9d3b55d627eeadb;hb=7eb228832ef75990d189029ebccfca627f104d37;hp=8450f54243ab136c900743dc50228d039a8a57e9;hpb=df0139b8dec30ef11734f92977a5e02f7caeb5bb;p=babeltrace.git diff --git a/include/babeltrace/compat/memstream-internal.h b/include/babeltrace/compat/memstream-internal.h index 8450f542..0b35330e 100644 --- a/include/babeltrace/compat/memstream-internal.h +++ b/include/babeltrace/compat/memstream-internal.h @@ -140,7 +140,7 @@ FILE *bt_fmemopen(void *buf, size_t size, const char *mode) /* * We need to write to the file. */ - fp = fdopen(ret, "w+"); + fp = fdopen(ret, "wb+"); if (!fp) { goto error_unlink; } @@ -263,7 +263,7 @@ FILE *bt_open_memstream(char **ptr, size_t *sizeloc) g_free(tmpname); return NULL; } - fp = fdopen(ret, "w+"); + fp = fdopen(ret, "wb+"); if (!fp) { goto error_unlink; }