libc_unix2.go 709 B

1234567891011121314151617181920212223242526
  1. // Copyright 2024 The Libc 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 illumos
  5. package libc // import "modernc.org/libc"
  6. import (
  7. "modernc.org/libc/sys/types"
  8. )
  9. // ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);
  10. func Xrecvmsg(t *TLS, sockfd int32, msg uintptr, flags int32) types.Ssize_t {
  11. if __ccgo_strace {
  12. trc("t=%v sockfd=%v msg=%v flags=%v, (%v:)", t, sockfd, msg, flags, origin(2))
  13. }
  14. panic(todo(""))
  15. // n, _, err := unix.Syscall(unix.SYS_RECVMSG, uintptr(sockfd), msg, uintptr(flags))
  16. // if err != 0 {
  17. // t.setErrno(err)
  18. // return -1
  19. // }
  20. //
  21. // return types.Ssize_t(n)
  22. }