summaryrefslogtreecommitdiff
path: root/src/stat/fchmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stat/fchmod.c')
-rw-r--r--src/stat/fchmod.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stat/fchmod.c b/src/stat/fchmod.c
index 6d281416..93e1b64c 100644
--- a/src/stat/fchmod.c
+++ b/src/stat/fchmod.c
@@ -13,5 +13,9 @@ int fchmod(int fd, mode_t mode)
char buf[15+3*sizeof(int)];
__procfdname(buf, fd);
+#ifdef SYS_chmod
return syscall(SYS_chmod, buf, mode);
+#else
+ return syscall(SYS_fchmodat, AT_FDCWD, buf, mode);
+#endif
}