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 4ee79756e0
commit 0b01986b0b
2 changed files with 10 additions and 1 deletions

View file

@ -82,7 +82,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' },