aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2023-08-30 13:34:23 +0200
committerWilliam Hubbs <w.d.hubbs@gmail.com>2023-09-12 22:53:12 -0500
commitc4785f1b99bd479926514c48fe0b5489eccfdfaa (patch)
tree92db15925e237bb3fe6b236dfdb13c68d633de12 /meson.build
parente447562aaadc96f8f95d6659e4776ce5c1a6c9d6 (diff)
misc: add syscall fallback for close_range for musl libc
Add fallback for the close_range syscall wrapper. This is needed for musl libc, which currently does not have a close_range wrapper. Also set errno on errors.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build2
1 files changed, 2 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index e77cae09..d1a8bd5b 100644
--- a/meson.build
+++ b/meson.build
@@ -197,6 +197,8 @@ endif
if cc.has_function('close_range', prefix: '#define _GNU_SOURCE\n#include <unistd.h>')
add_project_arguments('-DHAVE_CLOSE_RANGE', language: 'c')
+elif cc.has_header('linux/close_range.h')
+ add_project_arguments('-DHAVE_LINUX_CLOSE_RANGE_H', language: 'c')
endif
if cc.has_function('strlcpy', prefix: '#define _GNU_SOURCE\n#include <string.h>')