x/sys/unix: Missing AT_EACCESS on non-Linux Unix systems #59265
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
OS-Darwin
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://go.dev/play/p/yqd7iBRFmEV
What did you expect to see?
Program to run and (most likely) print
<nil>
.What did you see instead?
Compilation error:
Comment
AT_EACCESS is specified by the POSIX standard, in the fcntl.h header; used by the faccessat syscall.
If the latter syscall is exposed, I don't see any reason why the AT_EACCESS constant is not provided.
Looking through the source code of the x/sys/unix package however,
AT_EACCESS seems to only be available on LinuxAT_EACCESS is missing from AIX and Darwin.Workaround
I can workaround the issue by using CGo and manually poking at fcntl.h.
The text was updated successfully, but these errors were encountered: