repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix possible fd leak, unrestored cancellation state on dns socket fail
[musl.git]
/
src
/
stat
/
chmod.c
blob
d4f53c564e14701ea360a7159037c39838266d9f
1
#include <sys/stat.h>
2
#include <fcntl.h>
3
#include
"syscall.h"
4
5
int
chmod
(
const char
*
path
,
mode_t mode
)
6
{
7
#ifdef SYS_chmod
8
return
syscall
(
SYS_chmod
,
path
,
mode
);
9
#else
10
return
syscall
(
SYS_fchmodat
,
AT_FDCWD
,
path
,
mode
);
11
#endif
12
}