Commit 405a2f21 authored by Tobias Klauser's avatar Tobias Klauser Committed by Tobias Klauser

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 1fe33e3c
...@@ -111,7 +111,7 @@ typedef struct {} ptracePer; ...@@ -111,7 +111,7 @@ typedef struct {} ptracePer;
// The real epoll_event is a union, and godefs doesn't handle it well. // The real epoll_event is a union, and godefs doesn't handle it well.
struct my_epoll_event { struct my_epoll_event {
uint32_t events; 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 // padding is not specified in linux/eventpoll.h but added to conform to the
// alignment requirements of EABI // alignment requirements of EABI
int32_t padFd; int32_t padFd;
......
...@@ -564,6 +564,7 @@ type Ustat_t struct { ...@@ -564,6 +564,7 @@ type Ustat_t struct {
type EpollEvent struct { type EpollEvent struct {
Events uint32 Events uint32
_ int32
Fd int32 Fd int32
Pad int32 Pad int32
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment