mirror of
https://github.com/golang/go
synced 2024-11-22 00:54:43 -07:00
syscall: fix build for Sizeof change
R=ken2 CC=golang-dev https://golang.org/cl/4635051
This commit is contained in:
parent
cf9f380499
commit
61f4ec132b
@ -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
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user