Add C++ interface for the libbabeltrace2 `bt_field` API
[babeltrace.git] / src / compat / memstream.h
index 35ffa643d852403071473d1040c2f1d7dd0c67d8..dcadf048828daefc57ec61ee02ba442d71f456c0 100644 (file)
@@ -224,6 +224,8 @@ error_free:
 
 #else /* __MINGW32__ */
 
+#include <unistd.h>
+
 /*
  * Fallback for systems which don't have open_memstream. Create FILE *
  * with bt_open_memstream, but require call to
@@ -297,7 +299,7 @@ int bt_close_memstream(char **buf, size_t *size, FILE *fp)
        }
        *size = pos;
        /* add final \0 */
-       *buf = calloc(pos + 1, sizeof(char));
+       *buf = (char *) calloc(pos + 1, sizeof(char));
        if (!*buf) {
                return -ENOMEM;
        }
This page took 0.035735 seconds and 4 git commands to generate.