Skip to content

x/sys/unix: F_OFD_* consts are not present on Darwin #73351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
david-its opened this issue Apr 12, 2025 · 3 comments · May be fixed by golang/sys#248
Open

x/sys/unix: F_OFD_* consts are not present on Darwin #73351

david-its opened this issue Apr 12, 2025 · 3 comments · May be fixed by golang/sys#248
Assignees
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. OS-Darwin Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@david-its
Copy link

Go version

go version go1.24.0 darwin/arm64

Output of go env in your module/workspace:

not relevant

What did you do?

man fcntl describes OFD locks which are available on MacOS (initially invented on Linux).
However, syscall/zerrors_darwin_*.go files are missing definitions for these 3 consts:
F_OFD_GETLK, F_OFD_SETLK and F_OFD_SETLKW

What did you see happen?

not relevant

What did you expect to see?

consts present in Go definitions

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Apr 12, 2025
@david-its
Copy link
Author

Ouch, seems these consts are also not present for Linux AMD64/ARM64, only these 3 platforms:

syscall/zerrors_linux_loong64.go
384:	F_OFD_SETLK                       = 0x25
385:	F_OFD_SETLKW                      = 0x26

syscall/zerrors_linux_s390x.go
350:	F_OFD_SETLK                      = 0x25
351:	F_OFD_SETLKW                     = 0x26

syscall/zerrors_linux_riscv64.go
353:	F_OFD_SETLK                      = 0x25
354:	F_OFD_SETLKW                     = 0x26

@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Apr 12, 2025
@seankhliao seankhliao changed the title syscall: F_OFD_* consts are not present on Darwin x/sys/unix: F_OFD_* consts are not present on Darwin Apr 13, 2025
@gopherbot gopherbot added this to the Unreleased milestone Apr 13, 2025
@seankhliao
Copy link
Member

Note that syscall is frozen, and this should be in https://pkg.go.dev/golang.org/x/sys/unix
Feel free to send a change.

@tklauser tklauser added the NeedsFix The path to resolution is known, but the work has not been done. label Apr 14, 2025
@mknyszek mknyszek added Suggested Issues that may be good for new contributors looking for work to do. help wanted FeatureRequest Issues asking for a new feature that does not need a proposal. and removed BugReport Issues describing a possible bug in the Go implementation. labels Apr 16, 2025
@mauri870 mauri870 self-assigned this Apr 24, 2025
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/667795 mentions this issue: unix: update darwin syscalls with mkall.sh

@mauri870 mauri870 added OS-Darwin and removed compiler/runtime Issues related to the Go compiler and/or runtime. NeedsFix The path to resolution is known, but the work has not been done. help wanted labels Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest Issues asking for a new feature that does not need a proposal. OS-Darwin Suggested Issues that may be good for new contributors looking for work to do.
Projects
Development

Successfully merging a pull request may close this issue.

7 participants