summaryrefslogtreecommitdiff
path: root/header_checks
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-07-26 12:51:58 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-07-26 13:04:29 +0100
commitc9f82d8e5d2ac6d8d5e7cc1aa9e6019ef63ede9d (patch)
tree1db2dec7d79938205ca77bdfaa4a9317711e631b /header_checks
parent0259f9847292e49c0a47b383c986c7963aa4f818 (diff)
downloadefl-c9f82d8e5d2ac6d8d5e7cc1aa9e6019ef63ede9d.tar.gz
meson - for crossbuild move run check to just compile check
not as accurate but will do for cross build i guess for O_CLOEXEC
Diffstat (limited to 'header_checks')
-rw-r--r--header_checks/meson.build22
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 = [
['dladdr', ['dlfcn.h'], ['dl'], '-D_GNU_SOURCE=1']
]
-open_cloexec = cc.run('''#include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
- int main(int argc, char **argv) {
- int res = open(argv[0], O_RDONLY | O_CLOEXEC);
- if (res < 0) return 1;
- return 0;
- }
- ''',
- name : 'open works with O_CLOEXEC')
-if open_cloexec.compiled() and open_cloexec.returncode() == 0
+open_cloexec = cc.compiles('''#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ int main(int argc, char **argv) {
+ int res = open(argv[0], O_RDONLY | O_CLOEXEC);
+ if (res < 0) return 1;
+ return 0;
+ }
+ ''',
+ name : 'open works with O_CLOEXEC')
+if open_cloexec
config_h.set10('HAVE_OPEN_CLOEXEC', true)
endif