diff options
Diffstat (limited to 'header_checks')
-rw-r--r-- | header_checks/meson.build | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/header_checks/meson.build b/header_checks/meson.build index 4cc855e218..35b5db9fdd 100644 --- a/header_checks/meson.build +++ b/header_checks/meson.build | |||
@@ -123,17 +123,17 @@ function_checks = [ | |||
123 | ['dladdr', ['dlfcn.h'], ['dl'], '-D_GNU_SOURCE=1'] | 123 | ['dladdr', ['dlfcn.h'], ['dl'], '-D_GNU_SOURCE=1'] |
124 | ] | 124 | ] |
125 | 125 | ||
126 | open_cloexec = cc.run('''#include <sys/types.h> | 126 | open_cloexec = cc.compiles('''#include <sys/types.h> |
127 | #include <sys/stat.h> | 127 | #include <sys/stat.h> |
128 | #include <fcntl.h> | 128 | #include <fcntl.h> |
129 | int main(int argc, char **argv) { | 129 | int main(int argc, char **argv) { |
130 | int res = open(argv[0], O_RDONLY | O_CLOEXEC); | 130 | int res = open(argv[0], O_RDONLY | O_CLOEXEC); |
131 | if (res < 0) return 1; | 131 | if (res < 0) return 1; |
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | ''', | 134 | ''', |
135 | name : 'open works with O_CLOEXEC') | 135 | name : 'open works with O_CLOEXEC') |
136 | if open_cloexec.compiled() and open_cloexec.returncode() == 0 | 136 | if open_cloexec |
137 | config_h.set10('HAVE_OPEN_CLOEXEC', true) | 137 | config_h.set10('HAVE_OPEN_CLOEXEC', true) |
138 | endif | 138 | endif |
139 | 139 | ||