macOS: fix compilation warnings on macOS versions where clock_gettime() is finally implemented

This commit is contained in:
Paul Davis 2021-06-27 08:24:59 -06:00
parent 738b0ad21b
commit db0691d236

View File

@ -38,9 +38,10 @@ static double timer_rate_usecs = 0.0;
*/
#ifdef __MACH__
#include <mach/mach_time.h>
#ifndef CLOCK_REALTIME
/* Thanks Apple for not implementing this basic SUSv2, POSIX.1-2001 function
*/
#include <mach/mach_time.h>
#define CLOCK_REALTIME 0
#define CLOCK_MONOTONIC 0
int
@ -61,6 +62,7 @@ clock_gettime (int /*clk_id*/, struct timespec* t)
return 0;
}
#endif
#endif
void
PBD::microsecond_timer_init ()