#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;
}