mirror of
https://github.com/golang/go
synced 2024-11-26 08:17:59 -07:00
syscall: fix FD passing on FreeBSD and NetBSD
Fixes #3348. R=devon.odell, minux.ma, bradfitz, mdempsky CC=golang-dev https://golang.org/cl/7406050
This commit is contained in:
parent
c8c16cfbb9
commit
98d44d140d
@ -2,7 +2,7 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build linux darwin
|
// +build linux darwin freebsd netbsd
|
||||||
|
|
||||||
package syscall_test
|
package syscall_test
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ func CmsgSpace(datalen int) int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func cmsgData(h *Cmsghdr) unsafe.Pointer {
|
func cmsgData(h *Cmsghdr) unsafe.Pointer {
|
||||||
return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + SizeofCmsghdr)
|
return unsafe.Pointer(uintptr(unsafe.Pointer(h)) + uintptr(cmsgAlignOf(SizeofCmsghdr)))
|
||||||
}
|
}
|
||||||
|
|
||||||
// SocketControlMessage represents a socket control message.
|
// SocketControlMessage represents a socket control message.
|
||||||
|
Loading…
Reference in New Issue
Block a user