Fix: time redefinition warnings on macOS builds
[lttng-tools.git] / src / common / sessiond-comm / inet6.c
index 51d02ebb91d426fffc3928e0435240e8077ac861..0b0383cdd524f77c7749d93aad2c5643937009ae 100644 (file)
 #include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <time.h>
+#include <common/compat/time.h>
 #include <poll.h>
 
 #include <common/common.h>
+#include <common/time.h>
 
 #include "inet6.h"
 
-#define MSEC_PER_SEC   1000
-#define NSEC_PER_MSEC  1000000
 #define RECONNECT_DELAY        200     /* ms */
 
 /*
@@ -157,7 +156,7 @@ int connect_with_timeout(struct lttcomm_sock *sock)
                return -1;
        }
 
-       ret = clock_gettime(CLOCK_MONOTONIC, &orig_time);
+       ret = lttng_clock_gettime(CLOCK_MONOTONIC, &orig_time);
        if (ret == -1) {
                PERROR("clock_gettime");
                return -1;
@@ -211,7 +210,7 @@ int connect_with_timeout(struct lttcomm_sock *sock)
                        }
                }
                /* ret == 0: timeout */
-               ret = clock_gettime(CLOCK_MONOTONIC, &cur_time);
+               ret = lttng_clock_gettime(CLOCK_MONOTONIC, &cur_time);
                if (ret == -1) {
                        PERROR("clock_gettime");
                        connect_ret = ret;
This page took 0.0233 seconds and 4 git commands to generate.