Instead of relying on syscall.Syscall, always reach into the syscall
package to call the appropriate functions on Unix systems. We were
already doing this on Darwin. We also have to do this on
OpenBSD. Rather than sometimes reach into syscall and sometimes not,
just always reach in.
For golang/go#42064
Change-Id: Ie292a56766080d0c5ae6b6723d42b5475128290c
Reviewed-on: https://go-review.googlesource.com/c/net/+/366354
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Starting with 1.12, we must use syscall versions
of sysctl instead of the raw syscall.
An identical CL will go into the vendored copy of this package in the stdlib.
Change-Id: I6286ab3e49f82512491afb5bcf349e89ab5645ab
Reviewed-on: https://go-review.googlesource.com/c/148597
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This change drops a workaround for golang.org/issues/13372.
The compiler in Go 1.6 or above handles the "conversion of a
unsafe.Pointer to uintptr when calling syscall.Syscall" case
correctly.
Also fixes a typo.
Change-Id: I0433f3b8f75b34437aad91c6e8cf103e884d2a83
Reviewed-on: https://go-review.googlesource.com/37171
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This change introduces a package that provides the basic manipulation of
routing facilities on BSD variants.
Unlike the existing APIs in syscall package of standard library, the
package tries to provide operating system and its architecture agnostic
APIs. At present, the package supports any version of Darwin, any
version of DragonFly BSD, FreeBSD 7 through 11, NetBSD 6 and above, and
OpenBSD 5.6 and above.
Updates golang/go#14724.
Change-Id: Id964ea22dec491ddac3776e3a8c8c10f140f96ac
Reviewed-on: https://go-review.googlesource.com/22446
Run-TryBot: Mikio Hara <mikioh.mikioh@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>