diff options
author | Gibheer <gibheer+git@zero-knowledge.org> | 2022-11-08 17:04:09 +0100 |
---|---|---|
committer | Gibheer <gibheer+git@zero-knowledge.org> | 2022-11-08 17:04:09 +0100 |
commit | dc9dfb76ff9375e6368e9e05a40e6dc07b325a8d (patch) | |
tree | dc1dedb62230d9c5b225d890f970f8b8640caca6 /vendor/golang.org/x/sys/unix/syscall_illumos.go | |
parent | fa05045d31c05c8928020f05f1d281901d983b2b (diff) |
update dependencies
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall_illumos.go')
-rw-r--r-- | vendor/golang.org/x/sys/unix/syscall_illumos.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall_illumos.go b/vendor/golang.org/x/sys/unix/syscall_illumos.go index 8c53576..e48244a 100644 --- a/vendor/golang.org/x/sys/unix/syscall_illumos.go +++ b/vendor/golang.org/x/sys/unix/syscall_illumos.go @@ -20,10 +20,9 @@ func bytes2iovec(bs [][]byte) []Iovec { for i, b := range bs { iovecs[i].SetLen(len(b)) if len(b) > 0 { - // somehow Iovec.Base on illumos is (*int8), not (*byte) - iovecs[i].Base = (*int8)(unsafe.Pointer(&b[0])) + iovecs[i].Base = &b[0] } else { - iovecs[i].Base = (*int8)(unsafe.Pointer(&_zero)) + iovecs[i].Base = (*byte)(unsafe.Pointer(&_zero)) } } return iovecs @@ -162,6 +161,14 @@ func (l *Lifreq) GetLifruInt() int { return *(*int)(unsafe.Pointer(&l.Lifru[0])) } +func (l *Lifreq) SetLifruUint(d uint) { + *(*uint)(unsafe.Pointer(&l.Lifru[0])) = d +} + +func (l *Lifreq) GetLifruUint() uint { + return *(*uint)(unsafe.Pointer(&l.Lifru[0])) +} + func IoctlLifreq(fd int, req uint, l *Lifreq) error { return ioctl(fd, req, uintptr(unsafe.Pointer(l))) } |