chiark / gitweb /
journal: Set the last_unused pointer correctly when attaching an unused window
[elogind.git] / src / tmpfiles / tmpfiles.c
index 5d0f571bea605f7a15838e2dbf643309911418b0..bf900fa3d9c458460b2218dffa08e7e32940fe26 100644 (file)
@@ -551,12 +551,13 @@ static int recursive_relabel_children(Item *i, const char *path) {
                 return errno == ENOENT ? 0 : -errno;
 
         for (;;) {
-                struct dirent buf, *de;
+                struct dirent *de;
+                union dirent_storage buf;
                 bool is_dir;
                 int r;
                 char *entry_path;
 
-                r = readdir_r(d, &buf, &de);
+                r = readdir_r(d, &buf.de, &de);
                 if (r != 0) {
                         if (ret == 0)
                                 ret = -r;
@@ -672,6 +673,10 @@ static int create_item(Item *i) {
 
         case CREATE_FILE:
         case TRUNCATE_FILE:
+                r = write_one_file(i, i->path);
+                if (r < 0)
+                        return r;
+                break;
         case WRITE_FILE:
                 r = glob_item(i, write_one_file);
                 if (r < 0)