From 9eafafc0a87e0fd0aeeba439a4573537970c44c7 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Mon, 12 Aug 2019 07:25:24 +0000 Subject: [PATCH] unix: fix epoll_event padding on riscv64 Change-Id: I88bccf0e671d350f8f57ac4d277adf4081054729 GitHub-Last-Rev: 330214261152f83f8ec4fdeaf95d1aab46b4b5fe GitHub-Pull-Request: golang/sys#40 Reviewed-on: https://go-review.googlesource.com/c/sys/+/189877 Reviewed-by: Tobias Klauser Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot --- unix/linux/types.go | 2 +- unix/ztypes_linux_riscv64.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/unix/linux/types.go b/unix/linux/types.go index ef13c95a..f0da8164 100644 --- a/unix/linux/types.go +++ b/unix/linux/types.go @@ -276,7 +276,7 @@ struct my_epoll_event { // padding is not specified in linux/eventpoll.h but added to conform to the // alignment requirements of EABI int32_t padFd; -#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__) +#elif defined(__powerpc64__) || defined(__s390x__) || defined(__sparc__) || defined(__riscv) int32_t _padFd; #endif int32_t fd; diff --git a/unix/ztypes_linux_riscv64.go b/unix/ztypes_linux_riscv64.go index 8344583e..ccea3e63 100644 --- a/unix/ztypes_linux_riscv64.go +++ b/unix/ztypes_linux_riscv64.go @@ -808,6 +808,7 @@ type Ustat_t struct { type EpollEvent struct { Events uint32 + _ int32 Fd int32 Pad int32 }