1
0
mirror of https://github.com/golang/go synced 2024-11-25 13:57:57 -07:00

syscall: fix build for Sizeof change

R=ken2
CC=golang-dev
https://golang.org/cl/4635051
This commit is contained in:
Russ Cox 2011-06-17 17:07:21 -04:00
parent cf9f380499
commit 61f4ec132b
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ type RoutingMessage interface {
sockaddr() []Sockaddr sockaddr() []Sockaddr
} }
const anyMessageLen = unsafe.Sizeof(anyMessage{}) const anyMessageLen = int(unsafe.Sizeof(anyMessage{}))
type anyMessage struct { type anyMessage struct {
Msglen uint16 Msglen uint16

View File

@ -400,7 +400,7 @@ func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (errno int) {
} }
func SetsockoptString(fd, level, opt int, s string) (errno int) { func SetsockoptString(fd, level, opt int, s string) (errno int) {
return setsockopt(fd, level, opt, uintptr(unsafe.Pointer(&[]byte(s)[0])), len(s)) return setsockopt(fd, level, opt, uintptr(unsafe.Pointer(&[]byte(s)[0])), uintptr(len(s)))
} }
//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, errno int) //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, errno int)