From: Jérémie Galarneau Date: Fri, 6 Sep 2019 15:56:02 +0000 (-0400) Subject: Fix: redefinition of USEC_PER_SEC macro on macOS X-Git-Tag: v2.11.0-rc3~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=abedf16440c3f1dc225fa0ddc4667430ebb371f1;p=lttng-tools.git Fix: redefinition of USEC_PER_SEC macro on macOS USEC_PER_SEC is defined by system headers on macOS, resulting in a warning that it is redefined in time.h. Define it conditionally. Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/time.h b/src/common/time.h index dc07633e9..60d0a9bd5 100644 --- a/src/common/time.h +++ b/src/common/time.h @@ -27,7 +27,9 @@ #define NSEC_PER_SEC 1000000000ULL #define NSEC_PER_MSEC 1000000ULL #define NSEC_PER_USEC 1000ULL +#ifndef USEC_PER_SEC #define USEC_PER_SEC 1000000ULL +#endif #define USEC_PER_MSEC 1000ULL #define SEC_PER_MINUTE 60ULL