diff options
| author | Tobias Klauser <tklauser@distanz.ch> | 2019-11-12 19:59:02 +0100 |
|---|---|---|
| committer | Tobias Klauser <tobias.klauser@gmail.com> | 2019-11-12 19:15:15 +0000 |
| commit | 405a2f2161b6a12965e7a91bfe5d14b626e176fb (patch) | |
| tree | b75ee613d60691eb114c651e4ab07048944de87e /src | |
| parent | 1fe33e3cb20295b5120f82b02b0a9ab4ad303cc0 (diff) | |
| download | go-405a2f2161b6a12965e7a91bfe5d14b626e176fb.tar.xz | |
syscall: fix epoll_event padding on linux/arm64
EpollEvent needs padding before Fd as was already done for x/sys/unix in
CL 21971.
Fixes #35479
Change-Id: Iee963f9e26d0a23d16d6bab736fd71ae7f502894
Reviewed-on: https://go-review.googlesource.com/c/go/+/206838
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/syscall/types_linux.go | 2 | ||||
| -rw-r--r-- | src/syscall/ztypes_linux_arm64.go | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/syscall/types_linux.go b/src/syscall/types_linux.go index 9c9c521af4..20abda2473 100644 --- a/src/syscall/types_linux.go +++ b/src/syscall/types_linux.go @@ -111,7 +111,7 @@ typedef struct {} ptracePer; // The real epoll_event is a union, and godefs doesn't handle it well. struct my_epoll_event { uint32_t events; -#if defined(__ARM_EABI__) || (defined(__mips__) && _MIPS_SIM == _ABIO32) +#if defined(__ARM_EABI__) || defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABIO32) // padding is not specified in linux/eventpoll.h but added to conform to the // alignment requirements of EABI int32_t padFd; diff --git a/src/syscall/ztypes_linux_arm64.go b/src/syscall/ztypes_linux_arm64.go index d7e3526af6..f63391cdad 100644 --- a/src/syscall/ztypes_linux_arm64.go +++ b/src/syscall/ztypes_linux_arm64.go @@ -564,6 +564,7 @@ type Ustat_t struct { type EpollEvent struct { Events uint32 + _ int32 Fd int32 Pad int32 } |
