summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f8be118)
Include the compatibility time.h header in the common/time.h
to override any platform-defined constants. It seems that the
NSEC_PER_SEC (and other similar definitions) are defined to
nothing on macOS. This was already fixed in the compatibility
header in the past.
This also adds USEC_PER_SEC to the list of undef-initions
on macOS.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
#undef NSEC_PER_SEC
#undef NSEC_PER_MSEC
#undef NSEC_PER_USEC
#undef NSEC_PER_SEC
#undef NSEC_PER_MSEC
#undef NSEC_PER_USEC
#include <time.h>
#include <stdbool.h>
#include <common/macros.h>
#include <time.h>
#include <stdbool.h>
#include <common/macros.h>
+#include <common/compat/time.h>
#define MSEC_PER_SEC 1000ULL
#define NSEC_PER_SEC 1000000000ULL
#define NSEC_PER_MSEC 1000000ULL
#define NSEC_PER_USEC 1000ULL
#define MSEC_PER_SEC 1000ULL
#define NSEC_PER_SEC 1000000000ULL
#define NSEC_PER_MSEC 1000000ULL
#define NSEC_PER_USEC 1000ULL
#define USEC_PER_SEC 1000000ULL
#define USEC_PER_SEC 1000000ULL
#define USEC_PER_MSEC 1000ULL
#define SEC_PER_MINUTE 60ULL
#define USEC_PER_MSEC 1000ULL
#define SEC_PER_MINUTE 60ULL