From d929e40e9aed54ef7cd9f8853a34334f4f3c8f8e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 31 Jan 2018 13:59:00 +0100 Subject: syscall: use SYS_GETDENTS64 on linux/mips64{,le} The getdents64 syscall is only available for mips64/mips64le starting with Linux kernel 3.10. Since mips64le requires at least 4.8 according to [1] (regarding #16848) using it should be fine. [1] https://golang.org/wiki/MinimumRequirements This CL changes the binary layout of type Dirent for mips64/mips64le, but not the public API. But since the currently used layout doesn't match the struct linux_dirent returned by the getdents syscall this should be fine as well. Fixes #23624 Change-Id: Iaa7306fa6e4442ad2fed41c60b37627a7314f117 Reviewed-on: https://go-review.googlesource.com/91055 Reviewed-by: Brad Fitzpatrick Reviewed-by: Cherry Zhang --- src/syscall/syscall_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/syscall/syscall_linux.go') diff --git a/src/syscall/syscall_linux.go b/src/syscall/syscall_linux.go index 3fb9b1aa3f..d2cb7c1afe 100644 --- a/src/syscall/syscall_linux.go +++ b/src/syscall/syscall_linux.go @@ -831,7 +831,7 @@ func Mount(source string, target string, fstype string, flags uintptr, data stri //sys Fdatasync(fd int) (err error) //sys Flock(fd int, how int) (err error) //sys Fsync(fd int) (err error) -//sys Getdents(fd int, buf []byte) (n int, err error) = _SYS_getdents +//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64 //sysnb Getpgid(pid int) (pgid int, err error) func Getpgrp() (pid int) { -- cgit v1.3