summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openbsd-compat/bsd-misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index aa1c7d7a3..7a26ee40c 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -172,7 +172,7 @@ fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag)
172 return -1; 172 return -1;
173 } 173 }
174# ifndef HAVE_FCHOWN 174# ifndef HAVE_FCHOWN
175 return chown(pathname, owner, group); 175 return chown(path, owner, group);
176# else 176# else
177# ifdef O_NOFOLLOW 177# ifdef O_NOFOLLOW
178 if (flag & AT_SYMLINK_NOFOLLOW) 178 if (flag & AT_SYMLINK_NOFOLLOW)
@@ -203,7 +203,7 @@ fchmodat(int fd, const char *path, mode_t mode, int flag)
203 return -1; 203 return -1;
204 } 204 }
205# ifndef HAVE_FCHMOD 205# ifndef HAVE_FCHMOD
206 return chown(pathname, owner, group); 206 return chmod(path, mode);
207# else 207# else
208# ifdef O_NOFOLLOW 208# ifdef O_NOFOLLOW
209 if (flag & AT_SYMLINK_NOFOLLOW) 209 if (flag & AT_SYMLINK_NOFOLLOW)