aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-08-10 01:10:35 -0700
committerJade Lovelace <lix@jade.fyi>2024-08-10 16:11:58 -0700
commitb9ed79c99a35f91e438edd96eb37fe4f43002e70 (patch)
tree9869634c2b1a03cc7c0170de7a959c5e8e48dba4 /meson.build
parentb15d5cc6ee566127a634fcad74fef7e251f17878 (diff)
libutil: deal with Linux systems that do not implement close_range
Seems a little bit Rich that musl does not implement close_range because they suspect that the system call itself is a bad idea, so they uhhhh are considering not implementing a wrapper. Let's just fix the problem at hand by writing our own wrapper. Change-Id: I1f8e5858e4561d58a5450503d9c4585aded2b216
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 4e2f713ce..41bfe6722 100644
--- a/meson.build
+++ b/meson.build
@@ -417,6 +417,11 @@ check_funcs = [
'strsignal',
'sysconf',
]
+if target_machine.kernel() in ['linux', 'freebsd']
+ # musl does not have close_range as of 2024-08-10
+ # patch: https://www.openwall.com/lists/musl/2024/08/01/9
+ check_funcs += [ 'close_range' ]
+endif
foreach funcspec : check_funcs
define_name = 'HAVE_' + funcspec.underscorify().to_upper()
define_value = cxx.has_function(funcspec).to_int()