build: default to not trying to build epoll on non-Linux systems

dbus/dbus-pollable-set-epoll.c currently errors out if __linux__ is not
defined.  Allows passing -Depoll=enabled to override.

Based on patch by Jonathan Perkin for pkgsrc on illumos:
https://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/dbus/patches/patch-meson.build?rev=1.2
but modified to only change default of 'auto' and check for all non-Linux OSes.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith 2025-08-16 16:01:06 -07:00 committed by Simon McVittie
parent 14917abfa5
commit 68fe6edd9d

View file

@ -450,7 +450,7 @@ else
endif
endif
if get_option('epoll').disabled()
if get_option('epoll').disabled() or (get_option('epoll').auto() and (host_os != 'linux'))
use_linux_epoll = false
else
use_linux_epoll = (