diff --git a/unix/getdirentries_test.go b/unix/getdirentries_test.go index 16250bd6..87819e70 100644 --- a/unix/getdirentries_test.go +++ b/unix/getdirentries_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 darwin dragonfly +// +build darwin dragonfly freebsd openbsd netbsd package unix_test diff --git a/unix/syscall_netbsd.go b/unix/syscall_netbsd.go index 8f4c320e..45377107 100644 --- a/unix/syscall_netbsd.go +++ b/unix/syscall_netbsd.go @@ -137,7 +137,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { if unsafe.Sizeof(*basep) == 8 { return } - if off>>4 != 0 { + if off>>32 != 0 { // We can't stuff the offset back into a uintptr, so any // future calls would be suspect. Generate an error. // EIO is allowed by getdirentries. diff --git a/unix/syscall_openbsd.go b/unix/syscall_openbsd.go index 276c93be..4f34d6d0 100644 --- a/unix/syscall_openbsd.go +++ b/unix/syscall_openbsd.go @@ -106,7 +106,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { if unsafe.Sizeof(*basep) == 8 { return } - if off>>4 != 0 { + if off>>32 != 0 { // We can't stuff the offset back into a uintptr, so any // future calls would be suspect. Generate an error. // EIO was allowed by getdirentries.