#define _BABELTRACE_FORMAT_CTF_MEMSTREAM_H
/*
- * format/ctf/memstream.h
- *
* Copyright 2012 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
*
* memstream compatibility layer.
#else /* BABELTRACE_HAVE_FMEMOPEN */
+#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
/*
* We need to write to the file.
*/
- fp = fdopen(ret, "w+");
+ fp = fdopen(ret, "wb+");
if (!fp) {
goto error_unlink;
}
g_free(tmpname);
return NULL;
}
- fp = fdopen(ret, "w+");
+ fp = fdopen(ret, "wb+");
if (!fp) {
goto error_unlink;
}