aboutsummaryrefslogtreecommitdiff
path: root/src/syscall
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2019-11-15 10:43:37 +0100
committerTobias Klauser <tobias.klauser@gmail.com>2019-11-15 15:12:42 +0000
commitdd8bbc76c579767fb037b90cf7f49d8d41b7f3b0 (patch)
tree4d5fea147b48f09cf96a4c65599ab85f761e12fb /src/syscall
parent498eaee461adefd5e578e62c134382ece94198da (diff)
downloadgo-dd8bbc76c579767fb037b90cf7f49d8d41b7f3b0.tar.xz
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>
Diffstat (limited to 'src/syscall')
-rw-r--r--src/syscall/types_linux.go3
-rw-r--r--src/syscall/ztypes_linux_mips64.go1
-rw-r--r--src/syscall/ztypes_linux_mips64le.go1
3 files changed, 4 insertions, 1 deletions
diff --git a/src/syscall/types_linux.go b/src/syscall/types_linux.go
index 20abda2473..b47c3236c0 100644
--- a/src/syscall/types_linux.go
+++ b/src/syscall/types_linux.go
@@ -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;
diff --git a/src/syscall/ztypes_linux_mips64.go b/src/syscall/ztypes_linux_mips64.go
index cfcfd85b35..75a5bc4589 100644
--- a/src/syscall/ztypes_linux_mips64.go
+++ b/src/syscall/ztypes_linux_mips64.go
@@ -569,6 +569,7 @@ type Ustat_t struct {
type EpollEvent struct {
Events uint32
+ _ int32
Fd int32
Pad int32
}
diff --git a/src/syscall/ztypes_linux_mips64le.go b/src/syscall/ztypes_linux_mips64le.go
index cfcfd85b35..75a5bc4589 100644
--- a/src/syscall/ztypes_linux_mips64le.go
+++ b/src/syscall/ztypes_linux_mips64le.go
@@ -569,6 +569,7 @@ type Ustat_t struct {
type EpollEvent struct {
Events uint32
+ _ int32
Fd int32
Pad int32
}