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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/conf-files.c b/src/shared/conf-files.c
index 83e4cce156..34b86293d3 100644
--- a/src/shared/conf-files.c
+++ b/src/shared/conf-files.c
@@ -39,7 +39,6 @@
static int files_add(Hashmap *h, const char *path, const char *suffix) {
DIR *dir;
- struct dirent buffer, *de;
int r = 0;
dir = opendir(path);
@@ -50,10 +49,12 @@ static int files_add(Hashmap *h, const char *path, const char *suffix) {
}
for (;;) {
+ struct dirent *de;
+ union dirent_storage buf;
int k;
char *p;
- k = readdir_r(dir, &buffer, &de);
+ k = readdir_r(dir, &buf.de, &de);
if (k != 0) {
r = -k;
goto finish;