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.12.0-rc1~437 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=79064e4e3acf75b4acda0dbd2c9f0671302dbb2d 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