build: various fixes for compiling on macOS

This commit is contained in:
Christian Hergert
2020-11-16 14:01:02 -08:00
parent c82b0a1677
commit f18fbe5ae8
7 changed files with 48 additions and 8 deletions

View File

@ -68,9 +68,13 @@ void
sysprof_clock_init (void)
{
static const int clock_ids[] = {
#ifdef __APPLE__
_CLOCK_MONOTONIC,
#else
CLOCK_MONOTONIC,
CLOCK_MONOTONIC_RAW,
#endif
#ifdef __linux__
CLOCK_MONOTONIC_RAW,
CLOCK_MONOTONIC_COARSE,
CLOCK_REALTIME_COARSE,
#endif