X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fdelta%2Fdelta.c;h=803d2a7fc798bdc69b86b26e81b7a8b1959ec329;hb=599659860c770058f2eb04d578c521c16e0b1853;hp=4694fc8bc0e899c9297acf5ea8d158676567deaa;hpb=d966a7b3631a54602297ef3bff1dcaf35cbefd12;p=elogind.git diff --git a/src/delta/delta.c b/src/delta/delta.c index 4694fc8bc..803d2a7fc 100644 --- a/src/delta/delta.c +++ b/src/delta/delta.c @@ -176,11 +176,12 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, const char *path) { } 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; @@ -192,7 +193,7 @@ static int enumerate_dir(Hashmap *top, Hashmap *bottom, const char *path) { 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; @@ -254,7 +255,7 @@ static int process_suffix(const char *prefixes, const char *suffix) { NULSTR_FOREACH(p, prefixes) { char *t; - t = join(p, "/", suffix, NULL); + t = strjoin(p, "/", suffix, NULL); if (!t) { r = -ENOMEM; goto finish; @@ -453,8 +454,8 @@ int main(int argc, char *argv[]) { "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";