}
for (;;) {
- struct dirent *de, buf;
+ struct dirent *de;
+ union dirent_storage buf;
int k;
char *p;
- k = readdir_r(d, &buf, &de);
+ k = readdir_r(d, &buf.de, &de);
if (k != 0) {
r = -k;
goto finish;
if (!dirent_is_file(de))
continue;
- p = join(path, "/", de->d_name, NULL);
+ p = strjoin(path, "/", de->d_name, NULL);
if (!p) {
r = -ENOMEM;
goto finish;
static int process_suffix(const char *prefixes, const char *suffix) {
const char *p;
char *f;
- Hashmap *top, *bottom;
+ Hashmap *top, *bottom=NULL;
int r = 0, k;
Iterator i;
int n_found = 0;
NULSTR_FOREACH(p, prefixes) {
char *t;
- t = join(p, "/", suffix, NULL);
+ t = strjoin(p, "/", suffix, NULL);
if (!t) {
r = -ENOMEM;
goto finish;
"binfmt.d\0"
"systemd/system\0"
"systemd/user\0"
- "systemd/system.preset\0"
- "systemd/user.preset\0"
+ "systemd/system-preset\0"
+ "systemd/user-preset\0"
"udev/rules.d\0"
"modprobe.d\0";