1
0
mirror of https://github.com/golang/go synced 2024-11-17 04:34:46 -07:00

syscall: fix freebsd 64-bit test

64 bits is 8 bytes. Duh.

Change-Id: I991b359df6241889bdef13152f551af9db6e14c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/181557
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
Keith Randall 2019-06-10 12:18:44 -07:00 committed by Keith Randall
parent 350f71f4cb
commit 2d75c332cc

View File

@ -267,7 +267,7 @@ func Fstatfs(fd int, st *Statfs_t) (err error) {
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
if supportsABI(_ino64First) { if supportsABI(_ino64First) {
if unsafe.Sizeof(*basep) == 64 { if unsafe.Sizeof(*basep) == 8 {
return getdirentries_freebsd12(fd, buf, (*uint64)(unsafe.Pointer(basep))) return getdirentries_freebsd12(fd, buf, (*uint64)(unsafe.Pointer(basep)))
} }
// The freebsd12 syscall needs a 64-bit base. On 32-bit machines // The freebsd12 syscall needs a 64-bit base. On 32-bit machines