mirror of
git://git.musl-libc.org/musl
synced 2025-03-25 04:18:21 +00:00
add portable lchown (trivial to support and a few ancient things want it..)
This commit is contained in:
parent
982a478433
commit
d5ca067c7b
@ -86,6 +86,9 @@ int mkdirat(int, const char *, mode_t);
|
||||
int mknodat(int, const char *, mode_t, dev_t);
|
||||
int mkfifoat(int, const char *, mode_t);
|
||||
|
||||
#ifdef _BSD_SOURCE
|
||||
int lchmod(const char *, mode_t);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
7
src/stat/lchmod.c
Normal file
7
src/stat/lchmod.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
int lchmod(const char *path, mode_t mode)
|
||||
{
|
||||
return fchmodat(AT_FDCWD, path, mode, AT_SYMLINK_NOFOLLOW);
|
||||
}
|
Loading…
Reference in New Issue
Block a user