diff options
| author | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2021-03-15 22:18:14 +0000 |
|---|---|---|
| committer | Alexander Richardson <alexander.richardson@cl.cam.ac.uk> | 2021-09-10 11:35:54 +0000 |
| commit | c65f852fc8b2742e4944f58f9bd0f1e0b44b983a (patch) | |
| tree | 88ff4448fda881ba29f915cc89fa8921823254eb /meson.build | |
| parent | os-wrappers-test: Handle fcntl() being declared as a macro (diff) | |
| download | wayland-c65f852fc8b2742e4944f58f9bd0f1e0b44b983a.tar wayland-c65f852fc8b2742e4944f58f9bd0f1e0b44b983a.tar.gz wayland-c65f852fc8b2742e4944f58f9bd0f1e0b44b983a.tar.bz2 wayland-c65f852fc8b2742e4944f58f9bd0f1e0b44b983a.tar.lz wayland-c65f852fc8b2742e4944f58f9bd0f1e0b44b983a.tar.xz wayland-c65f852fc8b2742e4944f58f9bd0f1e0b44b983a.tar.zst wayland-c65f852fc8b2742e4944f58f9bd0f1e0b44b983a.zip | |
Use epoll-shim to emulate epoll(7) on FreeBSD
FreeBSD does not provide epoll(7) and instead requires an external library,
epoll-shim, that implements epoll() using kqueue(2)
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 714a86d..427aacf 100644 --- a/meson.build +++ b/meson.build @@ -43,6 +43,14 @@ foreach f: have_funcs endforeach if get_option('libraries') + if host_machine.system() == 'freebsd' + # When building for FreeBSD, epoll(7) is provided by a userspace + # wrapper around kqueue(2). + epoll_dep = dependency('epoll-shim') + else + # Otherwise, assume that epoll(7) is supported natively. + epoll_dep = [] + endif ffi_dep = dependency('libffi') decls = [ @@ -52,7 +60,7 @@ if get_option('libraries') ] foreach d: decls - if not cc.has_header_symbol(d['header'], d['symbol']) + if not cc.has_header_symbol(d['header'], d['symbol'], dependencies: epoll_dep) error('@0@ is needed to compile Wayland libraries'.format(d['symbol'])) endif endforeach |
