syscall: pass correct pointer to system call in recvmsgRaw
The code in recvmsgRaw, introduced in CL 384695, incorrectly passed
&rsa to the recvmsg system call. But in recvmsgRaw rsa is already a
pointer passed by the caller. This change passes the correct pointer.
I'm guessing that this didn't show up in the testsuite because
we run the tests in short mode.
Change-Id: I4c1c6b2c4836dafe8ff14275693b8fa8433b3313
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/685177
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@golang.org>
diff --git a/libgo/go/syscall/socket.go b/libgo/go/syscall/socket.go
index 54a4a99..35665d5 100644
--- a/libgo/go/syscall/socket.go
+++ b/libgo/go/syscall/socket.go
@@ -467,7 +467,7 @@
func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
+ msg.Name = (*byte)(unsafe.Pointer(rsa))
msg.Namelen = uint32(SizeofSockaddrAny)
var iov Iovec
if len(p) > 0 {