From 9fa3006323e86962ceaa3171b906cf2b1c2cf525 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 19 Dec 2013 11:25:08 +0100 Subject: core: replace readdir_r with readdir --- src/core/load-dropin.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c index a877e66098..35040090ac 100644 --- a/src/core/load-dropin.c +++ b/src/core/load-dropin.c @@ -63,12 +63,13 @@ static int iterate_dir( for (;;) { struct dirent *de; - union dirent_storage buf; _cleanup_free_ char *f = NULL; int k; - k = readdir_r(d, &buf.de, &de); - if (k != 0) { + errno = 0; + de = readdir(d); + if (!de && errno != 0) { + k = errno; log_error("Failed to read directory %s: %s", path, strerror(k)); return -k; } -- cgit v1.2.3-54-g00ecf