summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/chmod.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/chmod.c b/src/chmod.c
index ac3d8c7b8..098118c18 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -28,6 +28,7 @@
#include "error.h"
#include "filemode.h"
#include "modechange.h"
+#include "openat.h"
#include "quote.h"
#include "quotearg.h"
#include "root-dev-ino.h"
@@ -225,7 +226,7 @@ process_file (FTS *fts, FTSENT *ent)
if (! S_ISLNK (old_mode))
{
- if (chmod (file, new_mode) == 0)
+ if (chmodat (fts->fts_cwd_fd, file, new_mode) == 0)
chmod_succeeded = true;
else
{