summaryrefslogtreecommitdiff
path: root/src/shared/conf-files.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/conf-files.c')
-rw-r--r--src/shared/conf-files.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/conf-files.c b/src/shared/conf-files.c
index 92204a6a09..c86bb03074 100644
--- a/src/shared/conf-files.c
+++ b/src/shared/conf-files.c
@@ -53,13 +53,13 @@ static int files_add(Hashmap *h, const char *root, const char *path, const char
for (;;) {
struct dirent *de;
- union dirent_storage buf;
char *p;
int r;
- r = readdir_r(dir, &buf.de, &de);
- if (r != 0)
- return -r;
+ errno = 0;
+ de = readdir(dir);
+ if (!de && errno != 0)
+ return -errno;
if (!de)
break;