summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dir.c b/dir.c
index 0b293e3dd1..7ded65420b 100644
--- a/dir.c
+++ b/dir.c
@@ -1267,8 +1267,9 @@ glob_helper(
if (magical || recursive) {
struct dirent *dp;
+ DIR *dirp;
IF_HAVE_READDIR_R(struct dirent entry);
- DIR *dirp = do_opendir(*path ? path : ".", flags);
+ dirp = do_opendir(*path ? path : ".", flags);
if (dirp == NULL) return 0;
while (READDIR(dirp, enc, &entry, dp)) {