['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