diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2023-08-30 11:33:37 +0200 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2023-09-12 22:53:12 -0500 |
commit | 5bfb592d75f2e2ccfc94cb510c5eca755767dfbb (patch) | |
tree | 8ab85f4153c0122c3e86bf10aecc85e939d08620 /meson.build | |
parent | b2c4eb97b5818eec279d0b2f80886e7b2e37f283 (diff) |
supervise-daemon: rename HAVE_CLOSE_RANGE_EXEC to HAVE_CLOSE_RANGE
Use HAVE_CLOSE_RANGE to tell if system provides a close_range(2)
wrapper, which better explains the purpose.
Add a compat inline which returns -1 if close_range is unavailable.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 2cdd2b90..4ef3f38e 100644 --- a/meson.build +++ b/meson.build @@ -198,9 +198,8 @@ endif if cc.has_function('closefrom', prefix: '#define _GNU_SOURCE\n#include <unistd.h>') add_project_arguments('-DHAVE_CLOSEFROM', language: 'c') endif -if cc.has_function('close_range', prefix: '#define _GNU_SOURCE\n#include <unistd.h>') and \ - cc.has_header_symbol('unistd.h', 'CLOSE_RANGE_CLOEXEC', prefix: '#define _GNU_SOURCE') - add_project_arguments('-DHAVE_CLOSE_RANGE_CLOEXEC', language: 'c') +if cc.has_function('close_range', prefix: '#define _GNU_SOURCE\n#include <unistd.h>') + add_project_arguments('-DHAVE_CLOSE_RANGE', language: 'c') endif if cc.has_function('strlcpy', prefix: '#define _GNU_SOURCE\n#include <string.h>') |