[PATCH] 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)
committerShengjing Zhu <zhsj@debian.org>
Sun, 24 Jan 2021 19:15:38 +0000 (19:15 +0000)
commit86b1e57b1a7f0419c5f3ac55ae5fb172d8fbb08e
tree013d5309e70b0fd690891c429a9ac91dc2fa326c
parent9391f5ab824bcb58351362d53779ea37f2aeac13
[PATCH] 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