From 79064e4e3acf75b4acda0dbd2c9f0671302dbb2d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 6 Sep 2019 11:56:02 -0400 Subject: [PATCH] Fix: redefinition of USEC_PER_SEC macro on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/common/time.h | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.34.1