aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-26 18:17:12 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-26 18:17:12 +0200
commit5d9663a9805fe23950df96fa883418d103ab9693 (patch)
treebf9a02d46edae2026abcb46450659df14bd0c676
parent6592bdb9126326dee00f5e0d90b1cbb393f90096 (diff)
downloadmblaze-5d9663a9805fe23950df96fa883418d103ab9693.tar.gz
guard DT_* usage
It's a shortcut anyway, just leave it out
-rw-r--r--mdirs.c2
-rw-r--r--minc.c2
-rw-r--r--mseq.c2
-rw-r--r--seq.c2
4 files changed, 8 insertions, 0 deletions
diff --git a/mdirs.c b/mdirs.c
index 73fbb9f..8caa32d 100644
--- a/mdirs.c
+++ b/mdirs.c
@@ -42,8 +42,10 @@ mdirs(char *fpath)
}
while ((d = readdir(dir))) {
+#if defined(DT_DIR) && defined(DT_UNKNOWN)
if (d->d_type != DT_DIR && d->d_type != DT_UNKNOWN)
continue;
+#endif
if (d->d_name[0] == '.' &&
d->d_name[1] == 0)
continue;
diff --git a/minc.c b/minc.c
index 3788f35..d5da38a 100644
--- a/minc.c
+++ b/minc.c
@@ -33,8 +33,10 @@ inc(char *dir)
}
while ((d = readdir(fd))) {
+#if defined(DT_REG) && defined(DT_UNKNOWN)
if (d->d_type != DT_REG && d->d_type != DT_UNKNOWN)
continue;
+#endif
if (d->d_name[0] == '.')
continue;
diff --git a/mseq.c b/mseq.c
index adcec5b..87ff6f1 100644
--- a/mseq.c
+++ b/mseq.c
@@ -54,8 +54,10 @@ namescan(char *dir)
if (!fd)
return;
while ((d = readdir(fd))) {
+#if defined(DT_REG) && defined(DT_UNKNOWN)
if (d->d_type != DT_REG && d->d_type != DT_UNKNOWN)
continue;
+#endif
if (d->d_name[0] == '.')
continue;
diff --git a/seq.c b/seq.c
index 1441a0c..7c9fc12 100644
--- a/seq.c
+++ b/seq.c
@@ -328,8 +328,10 @@ iterdir(char *dir, void (*cb)(char *))
}
while ((d = readdir(fd))) {
+#if defined(DT_REG) && defined(DT_UNKNOWN)
if (d->d_type != DT_REG && d->d_type != DT_UNKNOWN)
continue;
+#endif
if (d->d_name[0] == '.')
continue;
if (fd2)