Set flags for OS-es without dp-type.

This commit is contained in:
Arun Prakash Jana 2019-12-23 20:14:03 +05:30
parent 0bc5cdbf26
commit b1207d54ea
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -3765,10 +3765,9 @@ static int dentfill(char *path, struct entry **dents)
goto exit; goto exit;
#ifdef __sun #ifdef __sun
if (cfg.blkorder) { /* no d_type */ flags = AT_SYMLINK_NOFOLLOW; /* no d_type */
#else #else
if (cfg.blkorder || dp->d_type == DT_UNKNOWN) { if (cfg.blkorder || dp->d_type == DT_UNKNOWN) {
#endif
/* /*
* Optimization added for filesystems which support dirent.d_type * Optimization added for filesystems which support dirent.d_type
* see readdir(3) * see readdir(3)
@ -3778,6 +3777,7 @@ static int dentfill(char *path, struct entry **dents)
*/ */
flags = AT_SYMLINK_NOFOLLOW; flags = AT_SYMLINK_NOFOLLOW;
} }
#endif
do { do {
namep = dp->d_name; namep = dp->d_name;