about summary refs log tree commit diff
path: root/sysdeps/posix/getcwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/getcwd.c')
-rw-r--r--sysdeps/posix/getcwd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/posix/getcwd.c b/sysdeps/posix/getcwd.c
index 1dc45e8ee2..911cbfab5d 100644
--- a/sysdeps/posix/getcwd.c
+++ b/sysdeps/posix/getcwd.c
@@ -401,8 +401,10 @@ __getcwd (buf, size)
 	      goto lose;
 	    }
 
+#ifdef _DIRENT_HAVE_D_TYPE
 	  if (d->d_type != DT_DIR && d->d_type != DT_UNKNOWN)
 	    continue;
+#endif
 	  if (d->d_name[0] == '.'
 	      && (d->d_name[1] == '\0'
 		  || (d->d_name[1] == '.' && d->d_name[2] == '\0')))