about summary refs log tree commit diff
path: root/io/fts.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/fts.c')
-rw-r--r--io/fts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io/fts.c b/io/fts.c
index 2ddb295c03..73f502fc26 100644
--- a/io/fts.c
+++ b/io/fts.c
@@ -703,7 +703,7 @@ mem1:				saved_errno = errno;
 				p->fts_info = FTS_NSOK;
 			p->fts_accpath = cur->fts_accpath;
 		} else if (nlinks == 0
-#ifdef DT_DIR
+#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
 		    || nlinks > 0 &&
 		    dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN
 #endif