Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build2
-rw-r--r--tools/dav1d.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index 034eae5..efdd09e 100644
--- a/meson.build
+++ b/meson.build
@@ -122,7 +122,7 @@ else
rt_dependency = []
if cc.has_function('clock_gettime', prefix : '#include <time.h>', args : test_args)
cdata.set('HAVE_CLOCK_GETTIME', 1)
- else
+ elif host_machine.system() != 'darwin'
rt_dependency = cc.find_library('rt', required: false)
if not cc.has_function('clock_gettime', prefix : '#include <time.h>', args : test_args, dependencies : rt_dependency)
error('clock_gettime not found')
diff --git a/tools/dav1d.c b/tools/dav1d.c
index cf6f315..72ee894 100644
--- a/tools/dav1d.c
+++ b/tools/dav1d.c
@@ -64,14 +64,14 @@ static uint64_t get_time_nanos(void) {
LARGE_INTEGER t;
QueryPerformanceCounter(&t);
return 1000000000 * t.QuadPart / frequency.QuadPart;
-#elif defined(__APPLE__)
- mach_timebase_info_data_t info;
- mach_timebase_info(&info);
- return mach_absolute_time() * info.numer / info.denom;
#elif defined(HAVE_CLOCK_GETTIME)
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return 1000000000ULL * ts.tv_sec + ts.tv_nsec;
+#elif defined(__APPLE__)
+ mach_timebase_info_data_t info;
+ mach_timebase_info(&info);
+ return mach_absolute_time() * info.numer / info.denom;
#endif
}