summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-12-18 00:15:13 +0000
committerChris Wilson <chris+github@qwirx.com>2007-12-18 00:15:13 +0000
commit60f0c81240c91cab9698e91973b6bbc1150d74c7 (patch)
tree091b640e7937ca93b7e7012ca2e6bcacf8f7996d
parentd7ff76379b7b339c22f238d04e87301197485396 (diff)
Stricter check for dirent.d_type validity (possible problems with
large file support resulting in reading the wrong part of the structure on Slackware?)
-rw-r--r--infrastructure/m4/ax_check_dirent_d_type.m42
1 files changed, 1 insertions, 1 deletions
diff --git a/infrastructure/m4/ax_check_dirent_d_type.m4 b/infrastructure/m4/ax_check_dirent_d_type.m4
index 87b93185..1c0e2ec2 100644
--- a/infrastructure/m4/ax_check_dirent_d_type.m4
+++ b/infrastructure/m4/ax_check_dirent_d_type.m4
@@ -24,7 +24,7 @@ AC_DEFUN([AX_CHECK_DIRENT_D_TYPE], [
DIR* dir = opendir(".");
struct dirent* res = NULL;
if(dir) res = readdir(dir);
- return res ? (res->d_type==DT_UNKNOWN) : 1;
+ return res ? (res->d_type != DT_FILE && res->d_type != DT_DIR) : 1;
]])],
[have_valid_dirent_d_type=yes], [have_valid_dirent_d_type=no]
)])