From: Michael Jeanson Date: Thu, 15 Sep 2016 15:11:29 +0000 (+0000) Subject: Open files as binary on Windows X-Git-Url: http://git.efficios.com/?p=deliverable%2Fbabeltrace.git;a=commitdiff_plain;h=833baeb5fb53e14136c19cbfb1343dad776a9703 Open files as binary on Windows Signed-off-by: Michael Jeanson --- diff --git a/include/babeltrace/compat/memstream-internal.h b/include/babeltrace/compat/memstream-internal.h index 8450f5424..0b35330eb 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; }