diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meson.build b/meson.build index fac5ac49..979517a9 100644 --- a/meson.build +++ b/meson.build @@ -192,6 +192,14 @@ if cc.compiles(malloc_attribute_test, name : 'malloc attribute with arguments') add_project_arguments('-DHAVE_MALLOC_EXTENDED_ATTRIBUTE', language: 'c') 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') +endif + incdir = include_directories('src/shared') einfo_incdir = include_directories('src/libeinfo') rc_incdir = include_directories('src/librc') |