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"