summaryrefslogtreecommitdiff
path: root/bin/cp/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/cp/utils.c')
-rw-r--r--bin/cp/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/cp/utils.c b/bin/cp/utils.c
index 93577ef4fb0a..d64fc7d6b2be 100644
--- a/bin/cp/utils.c
+++ b/bin/cp/utils.c
@@ -339,7 +339,7 @@ setfile(struct stat *fs, int fd)
if (!gotstat || fs->st_flags != ts.st_flags)
if (fdval ?
fchflags(fd, fs->st_flags) :
- (islink ? (errno = ENOSYS) :
+ (islink ? lchflags(to.p_path, fs->st_flags) :
chflags(to.p_path, fs->st_flags))) {
warn("chflags: %s", to.p_path);
rval = 1;