Merge branch 'as/dtype-compilation-fix'
Compilation fix for platforms without D_TYPE in struct dirent. * as/dtype-compilation-fix: statinfo.h: move DTYPE defines from dir.h
This commit is contained in:
14
dir.h
14
dir.h
@ -641,18 +641,4 @@ static inline int starts_with_dot_dot_slash_native(const char *const path)
|
|||||||
return path_match_flags(path, what | PATH_MATCH_NATIVE);
|
return path_match_flags(path, what | PATH_MATCH_NATIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#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
|
#endif
|
||||||
|
14
statinfo.h
14
statinfo.h
@ -21,4 +21,18 @@ struct stat_data {
|
|||||||
unsigned int sd_size;
|
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
|
#endif
|
||||||
|
Reference in New Issue
Block a user