syscall: fix EpollEvent padding on mips64{,le}

Like on other 64-bit GOARCHes, EpollEvent needs padding before Fd for
mips64 and mips64le.

Change-Id: I87773a1b305552ab4ed039623b40d2fff1f20d9b
Reviewed-on: https://go-review.googlesource.com/c/go/+/207298
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Tobias Klauser 2019-11-15 10:43:37 +01:00 committed by Tobias Klauser
parent 498eaee461
commit dd8bbc76c5
3 changed files with 4 additions and 1 deletions

View File

@ -116,7 +116,8 @@ struct my_epoll_event {
// alignment requirements of EABI
int32_t padFd;
#endif
#if defined(__powerpc64__) || defined(__s390x__) || (defined(__riscv_xlen) && __riscv_xlen == 64)
#if defined(__powerpc64__) || defined(__s390x__) || (defined(__riscv_xlen) && __riscv_xlen == 64) \
|| (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI64)
int32_t _padFd;
#endif
int32_t fd;

View File

@ -569,6 +569,7 @@ type Ustat_t struct {
type EpollEvent struct {
Events uint32
_ int32
Fd int32
Pad int32
}

View File

@ -569,6 +569,7 @@ type Ustat_t struct {
type EpollEvent struct {
Events uint32
_ int32
Fd int32
Pad int32
}