X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Ftests%2Fcheck_includes_build.c;h=7e0ab945f290dfaaa83e373b3255520a4e61fc20;hb=687cde2a8c561b68f17609b615eb930ea02f5aac;hp=d9c6f495be86f5b48a543a12ca3a5c9de7eb5b1f;hpb=5b7e9d904afa72961340c225de39daab29ff7d0e;p=ccan-lca-2011.git diff --git a/tools/ccanlint/tests/check_includes_build.c b/tools/ccanlint/tests/check_includes_build.c index d9c6f49..7e0ab94 100644 --- a/tools/ccanlint/tests/check_includes_build.c +++ b/tools/ccanlint/tests/check_includes_build.c @@ -25,11 +25,10 @@ static const char *can_build(struct manifest *m) static void *check_includes_build(struct manifest *m) { char *contents; - char *tmpfile, *objfile; + char *tmpfile, *err; int fd; tmpfile = temp_file(m, ".c"); - objfile = temp_file(m, ".o"); fd = open(tmpfile, O_WRONLY | O_CREAT | O_EXCL, 0600); if (fd < 0) @@ -44,7 +43,9 @@ static void *check_includes_build(struct manifest *m) } close(fd); - return compile_object(m, objfile, tmpfile); + if (compile_object(m, tmpfile, &err)) + return NULL; + return err; } static const char *describe_includes_build(struct manifest *m,