diff options
Diffstat (limited to 'statinfo.h')
-rw-r--r-- | statinfo.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/statinfo.h b/statinfo.h index bb9b61bc47..700f502ac0 100644 --- a/statinfo.h +++ b/statinfo.h @@ -72,4 +72,18 @@ int stat_validity_check(struct stat_validity *sv, const char *path); */ void stat_validity_update(struct stat_validity *sv, int fd); +#if defined(DT_UNKNOWN) && !defined(NO_D_TYPE_IN_DIRENT) +#define DTYPE(de) ((de)->d_type) +#else +#undef DT_UNKNOWN +#undef DT_DIR +#undef DT_REG +#undef DT_LNK +#define DT_UNKNOWN 0 +#define DT_DIR 1 +#define DT_REG 2 +#define DT_LNK 3 +#define DTYPE(de) DT_UNKNOWN +#endif + #endif |