You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

54 lines
1.3 KiB

  1. // 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. //go:build aix && ppc
  5. // +build aix,ppc
  6. package unix
  7. //sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
  8. //sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
  9. //sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
  10. func setTimespec(sec, nsec int64) Timespec {
  11. return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
  12. }
  13. func setTimeval(sec, usec int64) Timeval {
  14. return Timeval{Sec: int32(sec), Usec: int32(usec)}
  15. }
  16. func (iov *Iovec) SetLen(length int) {
  17. iov.Len = uint32(length)
  18. }
  19. func (msghdr *Msghdr) SetControllen(length int) {
  20. msghdr.Controllen = uint32(length)
  21. }
  22. func (msghdr *Msghdr) SetIovlen(length int) {
  23. msghdr.Iovlen = int32(length)
  24. }
  25. func (cmsg *Cmsghdr) SetLen(length int) {
  26. cmsg.Len = uint32(length)
  27. }
  28. func Fstat(fd int, stat *Stat_t) error {
  29. return fstat(fd, stat)
  30. }
  31. func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error {
  32. return fstatat(dirfd, path, stat, flags)
  33. }
  34. func Lstat(path string, stat *Stat_t) error {
  35. return lstat(path, stat)
  36. }
  37. func Stat(path string, statptr *Stat_t) error {
  38. return stat(path, statptr)
  39. }