From 07793e18801bcc5ae3b6e4b3e8131aa22c4ad0b9 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 10 Nov 2014 15:33:39 -0800 Subject: Remove HAVE_DIRENT_D_TYPE. Only Windows doesn't have it, and we don't build atree for Windows. Change-Id: Ib6e96be73340c36cdfcb3654ed540f690bf7550b --- tools/atree/files.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'tools/atree/files.cpp') diff --git a/tools/atree/files.cpp b/tools/atree/files.cpp index df3e987427..d945f589c2 100644 --- a/tools/atree/files.cpp +++ b/tools/atree/files.cpp @@ -447,14 +447,7 @@ list_dir(const string& path, const FileRecord& rec, 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); -- cgit v1.2.3-59-g8ed1b