syscall.go 469 B

1234567891011121314151617181920212223
  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. //go:build solaris
  5. // +build solaris
  6. package lif
  7. import (
  8. "syscall"
  9. "unsafe"
  10. )
  11. //extern __go_ioctl_ptr
  12. func libc_ioctl(int32, int32, unsafe.Pointer) int32
  13. func ioctl(s, ioc uintptr, arg unsafe.Pointer) error {
  14. if libc_ioctl(int32(s), int32(ioc), arg) < 0 {
  15. return syscall.GetErrno()
  16. }
  17. return nil
  18. }