darwin: Set rt_dep to empty as it's part of libSystem

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston Sequoia 2023-01-27 15:18:17 -08:00
parent d414619cb3
commit 4ee79756e0

View file

@ -96,11 +96,15 @@ if get_option('libraries')
endif
endforeach
rt_dep = []
if not cc.has_function('clock_gettime', prefix: '#include <time.h>')
rt_dep = cc.find_library('rt')
if not cc.has_function('clock_gettime', prefix: '#include <time.h>', 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 <time.h>')
rt_dep = cc.find_library('rt')
if not cc.has_function('clock_gettime', prefix: '#include <time.h>', dependencies: rt_dep, args: cc_args)
error('clock_gettime not found')
endif
endif
endif
endif