projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix undefined behavior in memset due to missing sequence points
[musl]
/
src
/
stat
/
fchmod.c
diff --git
a/src/stat/fchmod.c
b/src/stat/fchmod.c
index
6d28141
..
93e1b64
100644
(file)
--- 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
}