mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-05 16:47:27 -04:00
unix: fix Getdirentries emulation using Getdents on netbsd, openbsd
Call Seek if basep is not nil to read the current dir offset. Return EIO error if the offset doesn't fit into a 32-bit uintptr. Make Getdents public. Update golang/go#32498 Change-Id: Idfbc48d3fc3a6cc8a979242681e8882d39998285 Reviewed-on: https://go-review.googlesource.com/c/sys/+/182319 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
b47fdc9379
commit
15dcb6c006
@@ -389,7 +389,7 @@ func pipe() (fd1 int, fd2 int, err error) {
|
||||
|
||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||
|
||||
func getdents(fd int, buf []byte) (n int, err error) {
|
||||
func Getdents(fd int, buf []byte) (n int, err error) {
|
||||
var _p0 unsafe.Pointer
|
||||
if len(buf) > 0 {
|
||||
_p0 = unsafe.Pointer(&buf[0])
|
||||
|
||||
Reference in New Issue
Block a user