diff options
Diffstat (limited to 'libgo/go/golang_org/x/net/lif/syscall.go')
-rw-r--r-- | libgo/go/golang_org/x/net/lif/syscall.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libgo/go/golang_org/x/net/lif/syscall.go b/libgo/go/golang_org/x/net/lif/syscall.go new file mode 100644 index 0000000000..ea7541456b --- /dev/null +++ b/libgo/go/golang_org/x/net/lif/syscall.go @@ -0,0 +1,22 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build solaris + +package lif + +import ( + "syscall" + "unsafe" +) + +//extern __go_ioctl_ptr +func libc_ioctl(int32, int32, unsafe.Pointer) int32 + +func ioctl(s, ioc uintptr, arg unsafe.Pointer) error { + if libc_ioctl(int32(s), int32(ioc), arg) < 0 { + return syscall.GetErrno() + } + return nil +} |