| 75 | } |
| 76 | |
| 77 | static void *add_target(const struct targetdef *t) { |
| 78 | void *tmp; |
| 79 | tmp = realloc(targets, (targets_found + 2) * sizeof(struct targetdef *)); |
| 80 | if (NULL == tmp) { |
| 81 | perror("realloc"); |
| 82 | return tmp; |
| 83 | } |
| 84 | targets = tmp; |
| 85 | targets[targets_found++] = t; |
| 86 | targets[targets_found] = NULL; |
| 87 | return targets; |
| 88 | } |
| 89 | |
| 90 | static int found_system(void) { |
| 91 | if (!sys || (sys && !sys->name)) { |