X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=tools%2Fccanlint%2Fcompulsory_tests%2Fcheck_build.c;h=42eda13ae56aede90e2fd9df85927e9a1260129c;hb=63bceea014e091a2f2907e49f7c3b33f042106f4;hp=5bdec5533f5920b09f54b42f3197e6fef9cd5bd5;hpb=fb4c4c3ddc24772f71a64ec02d2c9ddaeb6e9f6b;p=ccan diff --git a/tools/ccanlint/compulsory_tests/check_build.c b/tools/ccanlint/compulsory_tests/check_build.c index 5bdec553..42eda13a 100644 --- a/tools/ccanlint/compulsory_tests/check_build.c +++ b/tools/ccanlint/compulsory_tests/check_build.c @@ -51,9 +51,10 @@ static void *check_use_build(struct manifest *m, { char *contents; char *tmpfile; + char *basename = talloc_asprintf(m, "%s/example.c", m->dir); int fd; - tmpfile = temp_file(m, ".c"); + tmpfile = maybe_temp_file(m, ".c", keep, basename); fd = open(tmpfile, O_WRONLY | O_CREAT | O_EXCL, 0600); if (fd < 0) @@ -74,7 +75,8 @@ static void *check_use_build(struct manifest *m, close(fd); return compile_and_link(m, tmpfile, ccan_dir, obj_list(m), "", - lib_list(m), temp_file(m, "")); + lib_list(m), + maybe_temp_file(m, "", keep, tmpfile)); } static const char *describe_use_build(struct manifest *m, void *check_result)