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
path: root/tools
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2019-11-23 01:05:44 +0300
committerJean-Baptiste Kempf <jb@videolan.org>2019-11-24 11:24:42 +0300
commiteaa3be9a841943389f43991c3edabde54f62350f (patch)
tree42d5420a4891731d4dcdf0ddf8608c1977e08ac3 /tools
parentb9a43c60954a5ca338febf252a1abbed2cd9e4d0 (diff)
tools: mach_absolute_time is not portable, so stop checking at configure
Diffstat (limited to 'tools')
-rw-r--r--tools/dav1d.c4
-rw-r--r--tools/meson.build2
2 files changed, 2 insertions, 4 deletions
diff --git a/tools/dav1d.c b/tools/dav1d.c
index 1277cc6..b171c05 100644
--- a/tools/dav1d.c
+++ b/tools/dav1d.c
@@ -44,7 +44,7 @@
#ifdef _WIN32
# include <windows.h>
#endif
-#if defined(HAVE_MACH_ABSOLUTE_TIME)
+#ifdef __APPLE__
#include <mach/mach_time.h>
#endif
@@ -67,7 +67,7 @@ static uint64_t get_time_nanos(void) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return 1000000000ULL * ts.tv_sec + ts.tv_nsec;
-#elif defined(HAVE_MACH_ABSOLUTE_TIME)
+#elif defined(__APPLE__)
mach_timebase_info_data_t info;
mach_timebase_info(&info);
return mach_absolute_time() * info.numer / info.denom;
diff --git a/tools/meson.build b/tools/meson.build
index 3793248..cd860a3 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -73,8 +73,6 @@ rt_dependency = []
if host_machine.system() != 'windows'
if cc.has_function('clock_gettime', prefix : '#include <time.h>', args : test_args)
cli_cdata.set('HAVE_CLOCK_GETTIME', 1)
- elif host_machine.system() == 'darwin'
- cli_cdata.set('HAVE_MACH_ABSOLUTE_TIME', 1)
else
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)