]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: fix freebsd 64-bit test
authorKeith Randall <khr@google.com>
Mon, 10 Jun 2019 19:18:44 +0000 (12:18 -0700)
committerKeith Randall <khr@golang.org>
Mon, 10 Jun 2019 20:03:20 +0000 (20:03 +0000)
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>
src/syscall/syscall_freebsd.go

index 725fe51eb9f54461d6bea9dc878b144fa1e169c7..eecae8de30d2b5f3c91aaad08dfc58269ad881ee 100644 (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) {
        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