Port: Add time.h compat for mingw
[babeltrace.git] / plugins / text / pretty / print.c
index 6cba7ce0997b116fea208f337cc140c50af7e01e..0545178efb48af6a2010d0cf8695f34efd165586 100644 (file)
@@ -40,6 +40,7 @@
 #include <babeltrace/graph/clock-class-priority-map.h>
 #include <babeltrace/bitfield-internal.h>
 #include <babeltrace/common-internal.h>
+#include <babeltrace/compat/time-internal.h>
 #include <inttypes.h>
 #include <ctype.h>
 #include "pretty.h"
@@ -201,7 +202,7 @@ void print_timestamp_wall(struct pretty_component *pretty,
                if (!pretty->options.clock_gmt) {
                        struct tm *res;
 
-                       res = localtime_r(&time_s, &tm);
+                       res = bt_localtime_r(&time_s, &tm);
                        if (!res) {
                                // TODO: log instead
                                fprintf(stderr, "[warning] Unable to get localtime.\n");
@@ -210,7 +211,7 @@ void print_timestamp_wall(struct pretty_component *pretty,
                } else {
                        struct tm *res;
 
-                       res = gmtime_r(&time_s, &tm);
+                       res = bt_gmtime_r(&time_s, &tm);
                        if (!res) {
                                // TODO: log instead
                                fprintf(stderr, "[warning] Unable to get gmtime.\n");
This page took 0.025829 seconds and 4 git commands to generate.