| 1 |
// Copyright 2016 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
//go:build solaris |
| 6 |
// +build solaris |
| 7 |
|
| 8 |
package lif |
| 9 |
|
| 10 |
import ( |
| 11 |
"syscall" |
| 12 |
"unsafe" |
| 13 |
) |
| 14 |
|
| 15 |
//extern __go_ioctl_ptr |
| 16 |
func libc_ioctl(int32, int32, unsafe.Pointer) int32 |
| 17 |
|
| 18 |
func ioctl(s, ioc uintptr, arg unsafe.Pointer) error { |
| 19 |
if libc_ioctl(int32(s), int32(ioc), arg) < 0 { |
| 20 |
return syscall.GetErrno() |
| 21 |
} |
| 22 |
return nil |
| 23 |
} |