unix: fix EpollEvent padding on mips64{,le}

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

Change-Id: I934368ba22ef7bf3a25949649613c2a03928bf83
Reviewed-on: https://go-review.googlesource.com/c/sys/+/207278
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Tobias Klauser
2019-11-06 08:41:42 +01:00
committed by Tobias Klauser
parent 4c7a9d0fe0
commit 52ab431487
3 changed files with 4 additions and 1 deletions

View File

@@ -283,7 +283,8 @@ struct my_epoll_event {
// padding is not specified in linux/eventpoll.h but added to conform to the
// alignment requirements of EABI
int32_t padFd;
#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__) || defined(__riscv)
#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__) || defined(__riscv) \
|| (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI64)
int32_t _padFd;
#endif
int32_t fd;

View File

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

View File

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