Remove HAVE_DIRENT_D_TYPE.

Only Windows doesn't have it, and we don't build atree for Windows.

Change-Id: Ib6e96be73340c36cdfcb3654ed540f690bf7550b
diff --git a/core/combo/include/arch/darwin-x86/AndroidConfig.h b/core/combo/include/arch/darwin-x86/AndroidConfig.h
index 9546f7a..24e9dd0 100644
--- a/core/combo/include/arch/darwin-x86/AndroidConfig.h
+++ b/core/combo/include/arch/darwin-x86/AndroidConfig.h
@@ -115,11 +115,6 @@
 /* #define HAVE_MALLOC_H */
 
 /*
- * Define if dirent struct has d_type field
- */
-#define HAVE_DIRENT_D_TYPE 1
-
-/*
  * Define if we have madvise() in <sys/mman.h>
  */
 #define HAVE_MADVISE 1
diff --git a/core/combo/include/arch/linux-arm/AndroidConfig.h b/core/combo/include/arch/linux-arm/AndroidConfig.h
index 7b009b8..51850c6 100644
--- a/core/combo/include/arch/linux-arm/AndroidConfig.h
+++ b/core/combo/include/arch/linux-arm/AndroidConfig.h
@@ -126,11 +126,6 @@
 #define HAVE_MADVISE 1
 
 /*
- * Define if dirent struct has d_type field
- */
-#define HAVE_DIRENT_D_TYPE 1
-
-/*
  * Define if libc includes Android system properties implementation.
  */
 #define HAVE_LIBC_SYSTEM_PROPERTIES 1
diff --git a/core/combo/include/arch/linux-arm64/AndroidConfig.h b/core/combo/include/arch/linux-arm64/AndroidConfig.h
index a15eaed..a8cd9a9 100644
--- a/core/combo/include/arch/linux-arm64/AndroidConfig.h
+++ b/core/combo/include/arch/linux-arm64/AndroidConfig.h
@@ -124,11 +124,6 @@
 #define HAVE_MADVISE 1
 
 /*
- * Define if dirent struct has d_type field
- */
-#define HAVE_DIRENT_D_TYPE 1
-
-/*
  * Define if libc includes Android system properties implementation.
  */
 #define HAVE_LIBC_SYSTEM_PROPERTIES 1
diff --git a/core/combo/include/arch/linux-mips/AndroidConfig.h b/core/combo/include/arch/linux-mips/AndroidConfig.h
index 42261cd..6213eba 100644
--- a/core/combo/include/arch/linux-mips/AndroidConfig.h
+++ b/core/combo/include/arch/linux-mips/AndroidConfig.h
@@ -166,11 +166,6 @@
 #define HAVE_MADVISE 1
 
 /*
- * Define if dirent struct has d_type field
- */
-#define HAVE_DIRENT_D_TYPE 1
-
-/*
  * Define if libc includes Android system properties implementation.
  */
 #define HAVE_LIBC_SYSTEM_PROPERTIES 1
diff --git a/core/combo/include/arch/linux-mips64/AndroidConfig.h b/core/combo/include/arch/linux-mips64/AndroidConfig.h
index 957baed..a1248c5 100644
--- a/core/combo/include/arch/linux-mips64/AndroidConfig.h
+++ b/core/combo/include/arch/linux-mips64/AndroidConfig.h
@@ -156,11 +156,6 @@
 #define HAVE_MADVISE 1
 
 /*
- * Define if dirent struct has d_type field
- */
-#define HAVE_DIRENT_D_TYPE 1
-
-/*
  * Define if libc includes Android system properties implementation.
  */
 #define HAVE_LIBC_SYSTEM_PROPERTIES 1
diff --git a/core/combo/include/arch/linux-x86/AndroidConfig.h b/core/combo/include/arch/linux-x86/AndroidConfig.h
index d8a94ca..1bbab4b 100644
--- a/core/combo/include/arch/linux-x86/AndroidConfig.h
+++ b/core/combo/include/arch/linux-x86/AndroidConfig.h
@@ -122,11 +122,6 @@
 #define HAVE_MADVISE 1
 
 /*
- * Define if dirent struct has d_type field
- */
-#define HAVE_DIRENT_D_TYPE 1
-
-/*
  * Define if system provides a system property server (should be
  * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES).
  */
diff --git a/core/combo/include/arch/target_linux-x86/AndroidConfig.h b/core/combo/include/arch/target_linux-x86/AndroidConfig.h
index 920d4b5..2ca324e 100644
--- a/core/combo/include/arch/target_linux-x86/AndroidConfig.h
+++ b/core/combo/include/arch/target_linux-x86/AndroidConfig.h
@@ -118,11 +118,6 @@
 #define HAVE_MADVISE 1
 
 /*
- * Define if dirent struct has d_type field
- */
-#define HAVE_DIRENT_D_TYPE 1
-
-/*
  * Define if libc includes Android system properties implementation.
  */
 #define HAVE_LIBC_SYSTEM_PROPERTIES 1
diff --git a/tools/atree/files.cpp b/tools/atree/files.cpp
index df3e987..d945f58 100644
--- a/tools/atree/files.cpp
+++ b/tools/atree/files.cpp
@@ -447,14 +447,7 @@
             continue;
         }
         string entry = path_append(path, ent->d_name);
-#ifdef HAVE_DIRENT_D_TYPE
-		bool is_directory = (ent->d_type == DT_DIR);
-#else
-	    // If dirent.d_type is missing, then use stat instead
-		struct stat stat_buf;
-		stat(entry.c_str(), &stat_buf);
-		bool is_directory = S_ISDIR(stat_buf.st_mode);
-#endif
+        bool is_directory = (ent->d_type == DT_DIR);
         add_more(entry, is_directory, rec, more);
         if (is_directory) {
             dirs.push_back(entry);
diff --git a/tools/atree/fs.cpp b/tools/atree/fs.cpp
index 9468cfd..6cd080e 100644
--- a/tools/atree/fs.cpp
+++ b/tools/atree/fs.cpp
@@ -63,14 +63,7 @@
             string full = path;
             full += '/';
             full += ent->d_name;
-#ifdef HAVE_DIRENT_D_TYPE
             bool is_directory = (ent->d_type == DT_DIR);
-#else
-            // If dirent.d_type is missing, then use stat instead
-            struct stat stat_buf;
-            stat(full.c_str(), &stat_buf);
-            bool is_directory = S_ISDIR(stat_buf.st_mode);
-#endif
             if (is_directory) {
                 dirs.push_back(full);
             } else {