#else /* __MINGW32__ */
+#include <unistd.h>
+
/*
* Fallback for systems which don't have open_memstream. Create FILE *
* with bt_open_memstream, but require call to
}
*size = pos;
/* add final \0 */
- *buf = calloc(pos + 1, sizeof(char));
+ *buf = (char *) calloc(pos + 1, sizeof(char));
if (!*buf) {
return -ENOMEM;
}