summaryrefslogtreecommitdiff
path: root/lib/fts.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fts.c')
-rw-r--r--lib/fts.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/fts.c b/lib/fts.c
index 879da65221..07fe170f2e 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -1421,7 +1421,7 @@ fts_safe_changedir (FTS *sp, FTSENT *p, int fd, char const *dir)
general (when the target is not ".."), diropen's use of
O_NOFOLLOW ensures we don't mistakenly follow a symlink,
so we can avoid the expense of this fstat. */
- if (ISSET(FTS_LOGICAL) || O_NOFOLLOW == 0
+ if (ISSET(FTS_LOGICAL) || ! HAVE_WORKING_O_NOFOLLOW
|| (dir && STREQ (dir, "..")))
{
struct stat sb;