darwin: Locate libffi with cc.find_library() rather than dependency()

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
Jeremy Huddleston Sequoia 2023-01-27 15:02:01 -08:00
parent fa50af6379
commit 8d62bfe3a4
2 changed files with 10 additions and 1 deletions

View file

@ -87,7 +87,12 @@ if get_option('libraries')
# Otherwise, assume that epoll(7) is supported natively.
epoll_dep = []
endif
ffi_dep = dependency('libffi')
if host_machine.system() == 'darwin'
ffi_dep = cc.find_library('ffi')
else
ffi_dep = dependency('libffi')
endif
decls = [
{ 'header': 'sys/signalfd.h', 'symbol': 'SFD_CLOEXEC' },