From 6930a86f0e4cd80171bc5e612f673e3eb5c545e8 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Fri, 26 Jul 2019 12:51:58 +0100 Subject: [PATCH] meson - for crossbuild move run check to just compile check not as accurate but will do for cross build i guess for O_CLOEXEC --- header_checks/meson.build | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/header_checks/meson.build b/header_checks/meson.build index 0df5c4c..a0cb122 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 - #include - #include - 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 + #include + #include + 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 -- 2.7.4