diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2015-07-19 12:15:56 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2015-07-19 12:15:56 -0400 |
commit | 894a7e2c5a0cc763375002e089494228f810db99 (patch) | |
tree | a3a24447372071c11afe113baeaa1e4b75bfc512 /bftw.c | |
parent | 7363b627b13009477a55f8f1b7981e672101d20e (diff) | |
download | bfs-894a7e2c5a0cc763375002e089494228f810db99.tar.xz |
bftw: Assume struct dirent::d_type exists if DT_* are defined.
Only glibc defines _DIRENT_HAVE_D_TYPE, but other C libraries have
d_type too.
This should fix #3.
Diffstat (limited to 'bftw.c')
-rw-r--r-- | bftw.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -428,7 +428,7 @@ int bftw(const char *dirpath, bftw_fn *fn, int nopenfd, int flags, void *ptr) { int typeflag = BFTW_UNKNOWN; -#ifdef _DIRENT_HAVE_D_TYPE +#if defined(_DIRENT_HAVE_D_TYPE) || defined(DT_DIR) switch (de->d_type) { case DT_DIR: typeflag = BFTW_D; |