-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/sys/unix: some SYS constants disappeared on Darwin #41868
Comments
These were dropped because (as you know) macOS doesn't want us to make direct system calls anyhow. They want us to go through libSystem in all cases. |
Change https://golang.org/cl/262959 mentions this issue: |
For golang/go#41868 Change-Id: I0f4dbeacfe10b9614caf05633a1de3a98a1fc85f Reviewed-on: https://go-review.googlesource.com/c/sys/+/262959 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com>
Change https://golang.org/cl/264637 mentions this issue: |
Change https://golang.org/cl/264638 mentions this issue: |
For golang/go#41868 Change-Id: I9fb8f5eee933488e4c63aaa757059b8cea4d9629 Reviewed-on: https://go-review.googlesource.com/c/sys/+/264637 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Matt Layher <mdlayher@gmail.com> TryBot-Result: Go Bot <gobot@golang.org>
See https://developer.apple.com/documentation/kernel/sockaddr_ctl for details. AF_SYSTEM is darwin-specific, so the BSD-specific anyToSockaddr func needs to call GOOS-specific funcs which return nil, EAFNOSUPPORT on all BSD platforms but darwin. For golang/go#41868 Change-Id: Id7794aba5988dd9511053b76be5efeb66c104a26 Reviewed-on: https://go-review.googlesource.com/c/sys/+/264638 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com>
This adds the fixes for golang/go#41868 which are needed to build wireguard without direct syscalls on macOS. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
The build breakage in |
@tklauser, thanks for that! What do you think about reverting the zsysnum file deletions from CL 250437? I don't think Go's migration away from raw system calls should force other people's schedules on when they migrate away from direct system calls. |
This adds the fixes for golang/go#41868 which are needed to build wireguard without direct syscalls on macOS. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
@bradfitz yeah, good point. Let's not force other people to migrate away just yet. I'll send a CL to re-add the zsysnum files. |
Change https://golang.org/cl/265857 mentions this issue: |
We updated our golang.org/x/sys dependency from
v0.0.0-20200812155832
tov0.0.0-20201008064518-c1f3e3309c71
and got a build breakage onGOOS=darwin
:/cc @ianlancetaylor @tklauser
The text was updated successfully, but these errors were encountered: