From 4ee79756e0b2d0d38d978b084944847ea6a5800d Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Sequoia Date: Fri, 27 Jan 2023 15:18:17 -0800 Subject: [PATCH] darwin: Set rt_dep to empty as it's part of libSystem Signed-off-by: Jeremy Huddleston Sequoia --- meson.build | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index cd6ceb21..c99829fc 100644 --- a/meson.build +++ b/meson.build @@ -96,11 +96,15 @@ if get_option('libraries') endif endforeach - rt_dep = [] - if not cc.has_function('clock_gettime', prefix: '#include ') - rt_dep = cc.find_library('rt') - if not cc.has_function('clock_gettime', prefix: '#include ', dependencies: rt_dep, args: cc_args) - error('clock_gettime not found') + if host_machine.system() == 'darwin' + rt_dep = [] + else + rt_dep = [] + if cc.has_function('clock_gettime', prefix: '#include ') + rt_dep = cc.find_library('rt') + if not cc.has_function('clock_gettime', prefix: '#include ', dependencies: rt_dep, args: cc_args) + error('clock_gettime not found') + endif endif endif endif