meson: Don't use target_machine

The target_machine variable is meant for the target
of cross compilers. We are not a cross compiler, so
instead reuse our host_machine based checks.

Fixes Linux→FreeBSD cross, since Meson can't figure
out `target_machine.kernel()` in that case.

Fixes: lix-project/lix#469

Change-Id: Ia46a64c8d507c3b08987a1de1eda171ff5e50df4
This commit is contained in:
Artemis Tosini 2024-08-13 20:30:29 +00:00 committed by jade
parent b016eb0895
commit 41a0b08e64

View file

@ -417,7 +417,7 @@ check_funcs = [
'strsignal', 'strsignal',
'sysconf', 'sysconf',
] ]
if target_machine.kernel() in ['linux', 'freebsd'] if is_linux or is_freebsd
# musl does not have close_range as of 2024-08-10 # musl does not have close_range as of 2024-08-10
# patch: https://www.openwall.com/lists/musl/2024/08/01/9 # patch: https://www.openwall.com/lists/musl/2024/08/01/9
check_funcs += [ 'close_range' ] check_funcs += [ 'close_range' ]