aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorEdgar Toernig <froese@gmx.de>2005-04-30 09:51:03 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-30 09:51:03 -0700
commitb6829693676c882ecb0d8ebc0a3a083e5e38131e (patch)
treeeff569014dce53b4bd0850e5f31089561cc258a6 /cache.h
parent9da3acfb1942ef28424ea58068faf6ac3a3fc2c8 (diff)
downloadgit-b6829693676c882ecb0d8ebc0a3a083e5e38131e.tar.gz
git-b6829693676c882ecb0d8ebc0a3a083e5e38131e.tar.xz
[PATCH] compat: missing dirent.d_type field
Not everybody has "d_type".
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index a10243d19..af6345820 100644
--- a/cache.h
+++ b/cache.h
@@ -21,6 +21,15 @@
#define deflateBound(c,s) ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11)
#endif
+#ifdef DT_UNKNOWN
+#define DTYPE(de) ((de)->d_type)
+#else
+#define DT_UNKNOWN 0
+#define DT_DIR 1
+#define DT_REG 2
+#define DTYPE(de) DT_UNKNOWN
+#endif
+
/*
* Basic data structures for the directory cache
*