mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
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>
This commit is contained in:
parent
8ec25be6db
commit
c65f852fc8
3 changed files with 15 additions and 4 deletions
10
meson.build
10
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue