support linux kernel apis (new archs) with old syscalls removed
[musl] / src / stat / fchmod.c
index 6d28141..93e1b64 100644 (file)
@@ -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
 }