diff options
Diffstat (limited to '')
-rw-r--r-- | statinfo.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/statinfo.h b/statinfo.h index e49e3054ea..fe8df633a4 100644 --- a/statinfo.h +++ b/statinfo.h @@ -21,4 +21,18 @@ struct stat_data { unsigned int sd_size; }; +#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 |