summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/unistd/renameat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/unistd/renameat.c b/src/unistd/renameat.c
index e2f03d39..6af5aed6 100644
--- a/src/unistd/renameat.c
+++ b/src/unistd/renameat.c
@@ -48,8 +48,8 @@ int renameat(int oldfd, const char *old, int newfd, const char *new)
/* Test equality of old and new.
If they both resolve to the same dentry, we do nothing. */
- if (fstatat(oldfd, old, &oldstat, 0) == 0 && \
- fstatat(newfd, new, &newstat, 0) == 0 && \
+ if (fstatat(oldfd, old, &oldstat, AT_SYMLINK_NOFOLLOW) == 0 && \
+ fstatat(newfd, new, &newstat, AT_SYMLINK_NOFOLLOW) == 0 && \
oldstat.st_dev == newstat.st_dev && \
oldstat.st_ino == newstat.st_ino) return 0;