mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
unix: check Faccessat2 returning EPERM in Faccessat
Some systems (e.g. the linux-arm and linux-arm64-packet builders) return EPERM instead of ENOSYS on unimplemented syscalls. Fall back to the existing glibc-like implementation in Faccessat in this case as well. This fixes tests on the linux-arm and linux-arm64-packet builders after CL 246537. Change-Id: I7d7598f9694a2db19bd17e79f333d5de3a31c6e2 Reviewed-on: https://go-review.googlesource.com/c/sys/+/246817 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
fcf3340312
commit
a37d78b922
@@ -1972,7 +1972,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
||||
return faccessat(dirfd, path, mode)
|
||||
}
|
||||
|
||||
if err := Faccessat2(dirfd, path, mode, flags); err != ENOSYS {
|
||||
if err := Faccessat2(dirfd, path, mode, flags); err != ENOSYS && err != EPERM {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user