Port: Fix libuuid compat on mingw
[babeltrace.git] / lib / ctf-writer / writer.c
index 6c4bbded741cd8487a7d4aa8ea2a280d935c7596..70f22e56ebee9dffe0bde410b893b4003c83c8fb 100644 (file)
@@ -26,6 +26,9 @@
  * SOFTWARE.
  */
 
+#define BT_LOG_TAG "WRITER"
+#include <babeltrace/lib-logging-internal.h>
+
 #include <babeltrace/ctf-writer/clock-internal.h>
 #include <babeltrace/ctf-writer/writer-internal.h>
 #include <babeltrace/ctf-ir/field-types-internal.h>
@@ -133,7 +136,12 @@ struct bt_ctf_writer *bt_ctf_writer_create(const char *path)
        }
 
        /* Generate a UUID for this writer's trace */
-       uuid_generate(uuid);
+       ret = bt_uuid_generate(uuid);
+       if (ret) {
+               BT_LOGE_STR("Cannot generate UUID for CTF writer's trace.");
+               goto error_destroy;
+       }
+
        ret = bt_ctf_trace_set_uuid(writer->trace, uuid);
        if (ret) {
                goto error_destroy;
@@ -217,7 +225,7 @@ struct bt_ctf_stream *bt_ctf_writer_create_stream(struct bt_ctf_writer *writer,
 {
        struct bt_ctf_stream *stream = NULL;
        int stream_class_count;
-       bool stream_class_found = false;
+       bt_bool stream_class_found = BT_FALSE;
        int i;
 
        if (!writer || !stream_class) {
@@ -236,7 +244,7 @@ struct bt_ctf_stream *bt_ctf_writer_create_stream(struct bt_ctf_writer *writer,
                                writer->trace, i);
 
                if (existing_stream_class == stream_class) {
-                       stream_class_found = true;
+                       stream_class_found = BT_TRUE;
                }
 
                BT_PUT(existing_stream_class);
This page took 0.02361 seconds and 4 git commands to generate.