diff --git a/src/pkg/syscall/passfd_test.go b/src/pkg/syscall/passfd_test.go index 20ef39ecaab..71a4a495f0c 100644 --- a/src/pkg/syscall/passfd_test.go +++ b/src/pkg/syscall/passfd_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build linux darwin +// +build linux darwin freebsd netbsd package syscall_test diff --git a/src/pkg/syscall/sockcmsg_unix.go b/src/pkg/syscall/sockcmsg_unix.go index 7d9a6ee8150..3af3068fd93 100644 --- a/src/pkg/syscall/sockcmsg_unix.go +++ b/src/pkg/syscall/sockcmsg_unix.go @@ -37,7 +37,7 @@ func CmsgSpace(datalen int) int { } 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.