aboutsummaryrefslogtreecommitdiffhomepage
path: root/wutil.cpp
diff options
context:
space:
mode:
authorGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2014-12-11 15:24:42 +0800
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2014-12-21 23:38:02 +0800
commita10f729ef9f778f09d8e0995f43551b3990daae7 (patch)
tree15d91e8967f31deea4f2bc94fef25e0e1e982053 /wutil.cpp
parentb9db5553430d8355bab48275727f685c7c42fa66 (diff)
use configure to detect dirent.d_type
Diffstat (limited to 'wutil.cpp')
-rw-r--r--wutil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/wutil.cpp b/wutil.cpp
index 0c877f36..52373fc8 100644
--- a/wutil.cpp
+++ b/wutil.cpp
@@ -81,7 +81,7 @@ bool wreaddir_resolving(DIR *dir, const std::wstring &dir_path, std::wstring &ou
/* We may be able to skip stat, if the readdir can tell us the file type directly */
bool check_with_stat = true;
-#if defined(_DIRENT_HAVE_D_TYPE) || __APPLE__
+#ifdef HAVE_STRUCT_DIRENT_D_TYPE
if (d->d_type == DT_DIR)
{
/* Known directory */
@@ -99,7 +99,7 @@ bool wreaddir_resolving(DIR *dir, const std::wstring &dir_path, std::wstring &ou
is_dir = false;
check_with_stat = false;
}
-#endif
+#endif // HAVE_STRUCT_DIRENT_D_TYPE
if (check_with_stat)
{
/* We couldn't determine the file type from the dirent; check by stat'ing it */