]> git.ozlabs.org Git - ccan/blobdiff - tools/ccanlint/compulsory_tests/check_build.c
From: Joseph Adams <joeyadams3.14159@gmail.com>
[ccan] / tools / ccanlint / compulsory_tests / check_build.c
index eb968e11e36d65052ce3d647e88093da16a33c8e..a0b596693c492824cade2404ba0f0ed1b6693249 100644 (file)
@@ -36,7 +36,7 @@ static char *obj_list(const struct manifest *m)
 static char *lib_list(const struct manifest *m)
 {
        unsigned int i, num;
-       char **libs = get_libs(m, ".", ".", &num, &m->info_file->compiled);
+       char **libs = get_libs(m, ".", &num, &m->info_file->compiled);
        char *ret = talloc_strdup(m, "");
 
        for (i = 0; i < num; i++)
@@ -70,7 +70,8 @@ static void *check_use_build(struct manifest *m)
        }
        close(fd);
 
-       if (!compile_and_link(m, tmpfile, obj_list(m), "", lib_list(m), &err))
+       if (!compile_and_link(m, tmpfile, ccan_dir, obj_list(m), "",
+                             lib_list(m), &err))
                return err;
        return NULL;
 }
@@ -83,6 +84,7 @@ static const char *describe_use_build(struct manifest *m, void *check_result)
 }
 
 struct ccanlint check_build = {
+       .key = "check-build",
        .name = "Module can be used",
        .total_score = 1,
        .check = check_use_build,