mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-02 23:27:31 -04:00
unix: change Solaris Iovec.Base to *byte
Every other Iovec.Base field is *byte, and that is the only reasonable value for Go. This is not backward compatible but we've made changes like this before. For golang/go#52885 Change-Id: I9a313a7931966a2483a322edd5c06c8cdca2557a Reviewed-on: https://go-review.googlesource.com/c/sys/+/412496 TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Alex Rakoczy <alex@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Gopher Robot
parent
4f61da869c
commit
175b2fd9d6
@@ -457,10 +457,10 @@ func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn
|
||||
msg.Namelen = uint32(SizeofSockaddrAny)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*int8)(unsafe.Pointer(&p[0]))
|
||||
iov.Base = &p[0]
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy int8
|
||||
var dummy byte
|
||||
if len(oob) > 0 {
|
||||
// receive at least one normal byte
|
||||
if len(p) == 0 {
|
||||
@@ -486,10 +486,10 @@ func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags i
|
||||
msg.Namelen = uint32(salen)
|
||||
var iov Iovec
|
||||
if len(p) > 0 {
|
||||
iov.Base = (*int8)(unsafe.Pointer(&p[0]))
|
||||
iov.Base = &p[0]
|
||||
iov.SetLen(len(p))
|
||||
}
|
||||
var dummy int8
|
||||
var dummy byte
|
||||
if len(oob) > 0 {
|
||||
// send at least one normal byte
|
||||
if len(p) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user