Port: open files in binary mode on Windows
[babeltrace.git] / include / babeltrace / compat / memstream-internal.h
index 8450f54243ab136c900743dc50228d039a8a57e9..0b35330eb5693014a7c34da7b9d3b55d627eeadb 100644 (file)
@@ -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;
        }
This page took 0.03763 seconds and 4 git commands to generate.