blob: 881cacc6cc5665a448256e997a4d43f5b62e013c [file] [log] [blame]
Don Newton98fd8812019-09-23 15:15:02 -04001// Copyright 2018 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// +build aix
6// +build ppc64
7
8package unix
9
10//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
11//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
12//sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek
13
14//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) = mmap64
15
16func setTimespec(sec, nsec int64) Timespec {
17 return Timespec{Sec: sec, Nsec: nsec}
18}
19
20func setTimeval(sec, usec int64) Timeval {
21 return Timeval{Sec: int64(sec), Usec: int32(usec)}
22}
23
24func (iov *Iovec) SetLen(length int) {
25 iov.Len = uint64(length)
26}
27
28func (msghdr *Msghdr) SetControllen(length int) {
29 msghdr.Controllen = uint32(length)
30}
31
Don Newton98fd8812019-09-23 15:15:02 -040032func (cmsg *Cmsghdr) SetLen(length int) {
33 cmsg.Len = uint32(length)
34}