aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/syscall_linux_mips64x.go
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2018-01-31 13:59:00 +0100
committerBrad Fitzpatrick <bradfitz@golang.org>2018-01-31 20:42:49 +0000
commitd929e40e9aed54ef7cd9f8853a34334f4f3c8f8e (patch)
tree7a70f67825a162d2f51df0cc3750cf65f23b6994 /src/syscall/syscall_linux_mips64x.go
parent43288467d2bcec28c46ed1610c56e563ce885d2f (diff)
downloadgo-d929e40e9aed54ef7cd9f8853a34334f4f3c8f8e.tar.xz
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 <bradfitz@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/syscall/syscall_linux_mips64x.go')
-rw-r--r--src/syscall/syscall_linux_mips64x.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/syscall/syscall_linux_mips64x.go b/src/syscall/syscall_linux_mips64x.go
index e4bc77530c..d9eba62b06 100644
--- a/src/syscall/syscall_linux_mips64x.go
+++ b/src/syscall/syscall_linux_mips64x.go
@@ -8,14 +8,7 @@
package syscall
const (
- _SYS_dup = SYS_DUP2
-
- // Linux introduced getdents64 syscall for N64 ABI only in 3.10
- // (May 21 2013, rev dec33abaafc89bcbd78f85fad0513170415a26d5),
- // to support older kernels, we have to use getdents for mips64.
- // Also note that struct dirent is different for these two.
- // Lookup linux_dirent{,64} in kernel source code for details.
- _SYS_getdents = SYS_GETDENTS
+ _SYS_dup = SYS_DUP2
_SYS_setgroups = SYS_SETGROUPS
)