Merge branch 'darwin-basedon-Torrekie' into 'main'

Add Darwin support - updated

Closes #545 and #310

See merge request wayland/wayland!481
This commit is contained in:
Liang Qi 2026-03-22 14:28:43 +00:00
commit 745a0a3511
15 changed files with 238 additions and 20 deletions

View file

@ -20,7 +20,7 @@ config_h.set_quoted('PACKAGE', meson.project_name())
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
cc_args = []
if host_machine.system() not in ['freebsd', 'openbsd']
if host_machine.system() not in ['freebsd', 'openbsd', 'darwin']
cc_args += ['-D_POSIX_C_SOURCE=200809L']
endif
add_project_arguments(cc_args, language: 'c')
@ -74,8 +74,8 @@ endif
config_h.set10('HAVE_BROKEN_MSG_CMSG_CLOEXEC', have_broken_msg_cmsg_cloexec)
if get_option('libraries')
if host_machine.system() in ['freebsd', 'openbsd']
# When building for FreeBSD, epoll(7) is provided by a userspace
if host_machine.system() in ['freebsd', 'openbsd', 'darwin']
# When building for BSDs, epoll(7) is provided by a userspace
# wrapper around kqueue(2).
epoll_dep = dependency('epoll-shim')
else