From 2d75c332cca28678ff61d9f7cd58a82acb75e197 Mon Sep 17 00:00:00 2001 From: Keith Randall Date: Mon, 10 Jun 2019 12:18:44 -0700 Subject: [PATCH] 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 TryBot-Result: Gobot Gobot Reviewed-by: Tobias Klauser --- src/syscall/syscall_freebsd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/syscall/syscall_freebsd.go b/src/syscall/syscall_freebsd.go index 725fe51eb9f..eecae8de30d 100644 --- a/src/syscall/syscall_freebsd.go +++ b/src/syscall/syscall_freebsd.go @@ -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) { if supportsABI(_ino64First) { - if unsafe.Sizeof(*basep) == 64 { + if unsafe.Sizeof(*basep) == 8 { return getdirentries_freebsd12(fd, buf, (*uint64)(unsafe.Pointer(basep))) } // The freebsd12 syscall needs a 64-bit base. On 32-bit machines