glide up
This commit is contained in:
5
vendor/golang.org/x/net/lif/syscall.go
generated
vendored
5
vendor/golang.org/x/net/lif/syscall.go
generated
vendored
@@ -19,8 +19,13 @@ 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