Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 910273 | Differences between
and this patch

Collapse All | Expand All

(-)a/libsbutil/sb_exists.c (-10 lines)
Lines 10-24 Link Here
10
int sb_exists(int dirfd, const char *pathname, int flags)
10
int sb_exists(int dirfd, const char *pathname, int flags)
11
{
11
{
12
	struct stat64 buf;
12
	struct stat64 buf;
13
14
	if (faccessat(dirfd, pathname, F_OK, flags) == 0)
15
		return 0;
16
17
	/* musl's faccessat gives EINVAL when the kernel does not support
18
	 * faccessat2 and AT_SYMLINK_NOFOLLOW is set.
19
	 * https://www.openwall.com/lists/musl/2023/06/19/1 */
20
	if (errno != EINVAL)
21
		return -1;
22
23
	return fstatat64(dirfd, pathname, &buf, flags);
13
	return fstatat64(dirfd, pathname, &buf, flags);
24
}
14
}

Return to bug 910273