diff options
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r-- | src/journal/sd-journal.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 2fa81727e0..acde84fe2d 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -1256,9 +1256,10 @@ static int add_directory(sd_journal *j, const char *prefix, const char *dirname) } for (;;) { - struct dirent buf, *de; + struct dirent *de; + union dirent_storage buf; - r = readdir_r(d, &buf, &de); + r = readdir_r(d, &buf.de, &de); if (r != 0 || !de) break; @@ -1334,10 +1335,11 @@ static int add_root_directory(sd_journal *j, const char *p) { } for (;;) { - struct dirent buf, *de; + struct dirent *de; + union dirent_storage buf; sd_id128_t id; - r = readdir_r(d, &buf, &de); + r = readdir_r(d, &buf.de, &de); if (r != 0 || !de) break; |