unix: fix Fstatat by using fillStat_t on linux/mips64x
authorAnthony Fok <foka@debian.org>
Fri, 28 Dec 2018 13:18:00 +0000 (06:18 -0700)
committerMichael Hudson-Doyle <mwhudson@debian.org>
Sun, 17 Mar 2019 20:37:17 +0000 (20:37 +0000)
commit26c8a4eed99e1107f2300adf9d344cc2a19cb2c0
treeca4089f34505a0d0a45f6ef3b5c95c8fde34dedf
parentdf49a9766106effef33fb32115ec553ba3e1328c
unix: fix Fstatat by using fillStat_t on linux/mips64x

The stat structure on linux/mips64x differ between C library and the kernel,
as described in the stat(2) man page.

Fstat, Lstat and Stat on linux/mips64x already converts the stat structure
using a fillStat_t function, very similar to __xstat_conv in GLIBC.
Doing the same for Fstatat before calling SYS_NEWFSTATAT fixes the
"Fstatat: returned stat does not match Stat/Lstat" error in TestFstatat.

Fixes golang/go#29401

Change-Id: I0b2a7b274acc3c7c9fc7ae2afe722dd6225da383
Reviewed-on: https://go-review.googlesource.com/c/155747
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Gbp-Pq: Name 0004-fix-Fstatat-by-using-fillStat_t-on-linux-mips64x.patch
src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
src/cmd/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go