about summary refs log tree commit diff
path: root/lr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lr.c')
-rw-r--r--lr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lr.c b/lr.c
index 4e4b1c5..aa6b0f1 100644
--- a/lr.c
+++ b/lr.c
@@ -1975,9 +1975,13 @@ recurse(char *path, struct history *h, int guessdir)
 				} else {
 					strcpy(path, de->d_name);
 				}
+#if defined(DT_DIR) && defined(DT_UNKNOWN)
 				int guesssubdir = de->d_type == DT_DIR ||
 				    (de->d_type == DT_LNK && resolve) ||
 				    de->d_type == DT_UNKNOWN;
+#else
+				int guesssubdir = 1;
+#endif
 				if ((r = recurse(path, &new, guesssubdir))) {
 					closedir(d);
 					return r;