From 0b01986b0bbeed7dacbac11fdcb4e1013737afa6 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Sequoia Date: Fri, 27 Jan 2023 15:02:01 -0800 Subject: [PATCH] darwin: Locate libffi with cc.find_library() rather than dependency() Signed-off-by: Jeremy Huddleston Sequoia --- meson.build | 7 ++++++- src/connection.c | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c99829fc..db52530d 100644 --- a/meson.build +++ b/meson.build @@ -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' }, diff --git a/src/connection.c b/src/connection.c index ceaeac14..af79450e 100644 --- a/src/connection.c +++ b/src/connection.c @@ -38,7 +38,11 @@ #include #include #include +#ifdef __APPLE__ +#include +#else #include +#endif #include "wayland-util.h" #include "wayland-private.h"