]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: fix EpollEvent padding on mips64{,le}
authorTobias Klauser <tklauser@distanz.ch>
Fri, 15 Nov 2019 09:43:37 +0000 (10:43 +0100)
committerTobias Klauser <tobias.klauser@gmail.com>
Fri, 15 Nov 2019 15:12:42 +0000 (15:12 +0000)
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>
src/syscall/types_linux.go
src/syscall/ztypes_linux_mips64.go
src/syscall/ztypes_linux_mips64le.go

index 20abda2473a355e644e68bc70a6e418576505bd6..b47c3236c0f2d22411826cb4b38dc61fb15b912e 100644 (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;
index cfcfd85b354868fa77c9e976a4181ffc9c1b2c72..75a5bc4589b2128ae0b8b8420a897c191b77f3d8 100644 (file)
@@ -569,6 +569,7 @@ type Ustat_t struct {
 
 type EpollEvent struct {
        Events uint32
+       _      int32
        Fd     int32
        Pad    int32
 }
index cfcfd85b354868fa77c9e976a4181ffc9c1b2c72..75a5bc4589b2128ae0b8b8420a897c191b77f3d8 100644 (file)
@@ -569,6 +569,7 @@ type Ustat_t struct {
 
 type EpollEvent struct {
        Events uint32
+       _      int32
        Fd     int32
        Pad    int32
 }