mirror of
https://github.com/golang/net.git
synced 2026-03-31 10:27:08 +09:00
lif: drop support for go1.5
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. Change-Id: I5b45094a78f15a631da277bbea0cb79fde25bb2a Reviewed-on: https://go-review.googlesource.com/37170 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
@@ -6,6 +6,3 @@
|
||||
|
||||
TEXT ·sysvicall6(SB),NOSPLIT,$0-88
|
||||
JMP syscall·sysvicall6(SB)
|
||||
|
||||
TEXT ·keepAlive(SB),NOSPLIT,$0
|
||||
RET
|
||||
|
||||
@@ -19,13 +19,8 @@ var procIoctl uintptr
|
||||
|
||||
func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
|
||||
|
||||
// TODO: replace with runtime.KeepAlive when available
|
||||
//go:noescape
|
||||
func keepAlive(p unsafe.Pointer)
|
||||
|
||||
func ioctl(s, ioc uintptr, arg unsafe.Pointer) error {
|
||||
_, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procIoctl)), 3, s, ioc, uintptr(arg), 0, 0, 0)
|
||||
keepAlive(arg)
|
||||
if errno != 0 {
|
||||
return error(errno)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user