Skip to content

Commit 405a2f2

Browse files
committed
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 <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 1fe33e3 commit 405a2f2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/syscall/types_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ typedef struct {} ptracePer;
111111
// The real epoll_event is a union, and godefs doesn't handle it well.
112112
struct my_epoll_event {
113113
uint32_t events;
114-
#if defined(__ARM_EABI__) || (defined(__mips__) && _MIPS_SIM == _ABIO32)
114+
#if defined(__ARM_EABI__) || defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABIO32)
115115
// padding is not specified in linux/eventpoll.h but added to conform to the
116116
// alignment requirements of EABI
117117
int32_t padFd;

src/syscall/ztypes_linux_arm64.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,7 @@ type Ustat_t struct {
564564

565565
type EpollEvent struct {
566566
Events uint32
567+
_ int32
567568
Fd int32
568569
Pad int32
569570
}

0 commit comments

Comments
 (0)