Skip to content

Commit 52ab431

Browse files
committed
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 <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 4c7a9d0 commit 52ab431

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

unix/linux/types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ struct my_epoll_event {
283283
// padding is not specified in linux/eventpoll.h but added to conform to the
284284
// alignment requirements of EABI
285285
int32_t padFd;
286-
#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__) || defined(__riscv)
286+
#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__) || defined(__riscv) \
287+
|| (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI64)
287288
int32_t _padFd;
288289
#endif
289290
int32_t fd;

unix/ztypes_linux_mips64.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

unix/ztypes_linux_mips64le.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)