diff options
author | Enno Boland <g@s01.de> | 2017-05-24 13:19:32 +0200 |
---|---|---|
committer | Enno Boland <g@s01.de> | 2017-05-24 13:19:32 +0200 |
commit | 1b32d6bd3e470253367114733e749f703af84f19 (patch) | |
tree | a5712561ebaaa17d5458b87e2be4e3064a64e407 /src/basic/fs-util.h | |
parent | 6f5cab404dbf4a19ac9e882e37b1cb86fd0614d4 (diff) |
musl-fix: faccessat does not support AT_SYMLINK_NOFOLLOW with musl.
Diffstat (limited to 'src/basic/fs-util.h')
-rw-r--r-- | src/basic/fs-util.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h index 294d617cd..2000b38a9 100644 --- a/src/basic/fs-util.h +++ b/src/basic/fs-util.h @@ -51,7 +51,12 @@ int fchmod_umask(int fd, mode_t mode); int fd_warn_permissions(const char *path, int fd); +#ifdef __GLIBC__ #define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) +#else +#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), 0) +#endif + int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); int touch(const char *path); |