summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/journal/journald-server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 3f8b95dee0..a3bacdab66 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -135,11 +135,11 @@ static uint64_t available_space(Server *s, bool verbose) {
for (;;) {
struct stat st;
struct dirent *de;
- union dirent_storage buf;
- r = readdir_r(d, &buf.de, &de);
- if (r != 0)
- break;
+ errno = 0;
+ de = readdir(d);
+ if (!de && errno != 0)
+ return 0;
if (!de)
break;