diff --git a/features/features_cpu.c b/features/features_cpu.c index 5b4595b0..91b77dc5 100644 --- a/features/features_cpu.c +++ b/features/features_cpu.c @@ -26,6 +26,7 @@ #if defined(_WIN32) #include #else +#define _POSIX_C_SOURCE 200112 #include #endif @@ -167,7 +168,7 @@ retro_perf_tick_t cpu_features_get_perf_counter(void) tv_sec = (long)((ularge.QuadPart - epoch) / 10000000L); tv_usec = (long)(system_time.wMilliseconds * 1000); time_ticks = (1000000 * tv_sec + tv_usec); -#elif defined(__linux__) || defined(__QNX__) || defined(__MACH__) +#elif defined(__linux__) || defined(BSD) || defined(__QNX__) || defined(__MACH__) struct timespec tv = {0}; if (ra_clock_gettime(CLOCK_MONOTONIC, &tv) == 0) time_ticks = (retro_perf_tick_t)tv.tv_sec * 1000000000 +