提交 d5ca067c 编写于 作者: R Rich Felker

add portable lchown (trivial to support and a few ancient things want it..)

上级 982a4784
...@@ -86,6 +86,9 @@ int mkdirat(int, const char *, mode_t); ...@@ -86,6 +86,9 @@ int mkdirat(int, const char *, mode_t);
int mknodat(int, const char *, mode_t, dev_t); int mknodat(int, const char *, mode_t, dev_t);
int mkfifoat(int, const char *, mode_t); int mkfifoat(int, const char *, mode_t);
#ifdef _BSD_SOURCE
int lchmod(const char *, mode_t);
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
......
#include <sys/stat.h>
#include <fcntl.h>
int lchmod(const char *path, mode_t mode)
{
return fchmodat(AT_FDCWD, path, mode, AT_SYMLINK_NOFOLLOW);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册