about summary refs log tree commit diff
path: root/src/stat/fchmodat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stat/fchmodat.c')
-rw-r--r--src/stat/fchmodat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/stat/fchmodat.c b/src/stat/fchmodat.c
index 41db0c46..92c9d1b0 100644
--- a/src/stat/fchmodat.c
+++ b/src/stat/fchmodat.c
@@ -7,11 +7,14 @@ int fchmodat(int fd, const char *path, mode_t mode, int flag)
 {
 	if (!flag) return syscall(SYS_fchmodat, fd, path, mode);
 
+	int ret = __syscall(SYS_fchmodat2, fd, path, mode, flag);
+	if (ret != -ENOSYS) return __syscall_ret(ret);
+
 	if (flag != AT_SYMLINK_NOFOLLOW)
 		return __syscall_ret(-EINVAL);
 
 	struct stat st;
-	int ret, fd2;
+	int fd2;
 	char proc[15+3*sizeof(int)];
 
 	if (fstatat(fd, path, &st, flag))