diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-02-17 23:13:46 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-02-17 23:13:46 -0500 |
commit | d5ca067c7bb47081c169ff8b0213c73418f0525e (patch) | |
tree | bb958a655f824c9cc4019548cf8284167e679ce0 /src/stat | |
parent | 982a47843316e65f2b849e9def893195396aeec0 (diff) | |
download | musl-d5ca067c7bb47081c169ff8b0213c73418f0525e.tar.gz musl-d5ca067c7bb47081c169ff8b0213c73418f0525e.tar.bz2 musl-d5ca067c7bb47081c169ff8b0213c73418f0525e.tar.xz musl-d5ca067c7bb47081c169ff8b0213c73418f0525e.zip |
add portable lchown (trivial to support and a few ancient things want it..)
Diffstat (limited to 'src/stat')
-rw-r--r-- | src/stat/lchmod.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stat/lchmod.c b/src/stat/lchmod.c new file mode 100644 index 00000000..c35f5861 --- /dev/null +++ b/src/stat/lchmod.c @@ -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); +} |