CL 182319 used the wrong shift offset, correct and enable the TestGetdirentries. Change-Id: I45d8d420a071fd79fa1b37642b984d80943f492b Reviewed-on: https://go-review.googlesource.com/c/sys/+/183221 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
@@ -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
@@ -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.
@@ -106,7 +106,7 @@ func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
// EIO was allowed by getdirentries.