Commit 1322fd33 authored by Rusty Russell's avatar Rusty Russell

configurator: test for HAVE_FCHDIR

Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent f103f73f
......@@ -146,6 +146,15 @@ static struct test tests[] = {
{ "HAVE_COMPOUND_LITERALS", INSIDE_MAIN, NULL, NULL,
"int *foo = (int[]) { 1, 2, 3, 4 };\n"
"return foo[0] ? 0 : 1;" },
{ "HAVE_FCHDIR", DEFINES_EVERYTHING|EXECUTE, NULL, NULL,
"#include <sys/types.h>\n"
"#include <sys/stat.h>\n"
"#include <fcntl.h>\n"
"#include <unistd.h>\n"
"int main(void) {\n"
" int fd = open(\"..\", O_RDONLY);\n"
" return fchdir(fd) == 0 ? 0 : 1;\n"
"}\n" },
{ "HAVE_ERR_H", DEFINES_FUNC, NULL, NULL,
"#include <err.h>\n"
"static void func(int arg) {\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment