1#define _GNU_SOURCE 2#include <fcntl.h> 3#include <sys/stat.h> 4 5int lchmod(const char* path, mode_t mode) { 6 return fchmodat(AT_FDCWD, path, mode, AT_SYMLINK_NOFOLLOW); 7} 8