From 4abab5ad6c8465a7528ccdd5f49367da05f78bbd Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Tue, 1 Oct 2024 15:47:05 +0200 Subject: Initial version --- src/stat/lchmod.c | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/stat/lchmod.c (limited to 'src/stat/lchmod.c') diff --git a/src/stat/lchmod.c b/src/stat/lchmod.c new file mode 100644 index 0000000..f324ba7 --- /dev/null +++ b/src/stat/lchmod.c @@ -0,0 +1,8 @@ +#define _GNU_SOURCE +#include +#include + +int lchmod(const char *path, mode_t mode) +{ + return fchmodat(AT_FDCWD, path, mode, AT_SYMLINK_NOFOLLOW); +} -- cgit v1.2.3