aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLynn Boger <laboger@linux.vnet.ibm.com>2016-04-06 11:07:12 -0500
committerAndrew Gerrand <adg@golang.org>2016-04-19 04:49:35 +0000
commitdf801575131aa0a16046aafe03de8e3283b7735c (patch)
tree158d1dfb724832ab2247c13ec5e7cbce2a86ffeb
parent5fdefe91da79eda584a30b6f32b9b841bbcc23dc (diff)
downloadgo-df801575131aa0a16046aafe03de8e3283b7735c.tar.gz
go-df801575131aa0a16046aafe03de8e3283b7735c.zip
syscall: fix epoll_event struct for ppc64le/ppc64
The existing epoll_event structure used by many of the epoll_* syscalls was defined incorrectly for use with ppc64le & ppc64 in the syscall directory. This resulted in the caller getting incorrect information on return from these syscalls. This caused failures in fsnotify as well as builds with upstream Docker. The structure is defined correctly in gccgo. This adds a pad field that is expected for these syscalls on ppc64le, ppc64. Fixes #15135 Fixes #15288 Change-Id: If7e8ea9eb1d1ca5182c8dc0f935b334127341ffd Reviewed-on: https://go-review.googlesource.com/21582 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-on: https://go-review.googlesource.com/22207 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r--src/syscall/types_linux.go3
-rw-r--r--src/syscall/ztypes_linux_ppc64.go7
-rw-r--r--src/syscall/ztypes_linux_ppc64le.go7
3 files changed, 11 insertions, 6 deletions
diff --git a/src/syscall/types_linux.go b/src/syscall/types_linux.go
index cff4069370..cb6836be83 100644
--- a/src/syscall/types_linux.go
+++ b/src/syscall/types_linux.go
@@ -105,6 +105,9 @@ struct my_epoll_event {
// alignment requirements of EABI
int32_t padFd;
#endif
+#ifdef __powerpc64__
+ int32_t _padFd;
+#endif
int32_t fd;
int32_t pad;
};
diff --git a/src/syscall/ztypes_linux_ppc64.go b/src/syscall/ztypes_linux_ppc64.go
index 33d1b7f3e5..915ca95190 100644
--- a/src/syscall/ztypes_linux_ppc64.go
+++ b/src/syscall/ztypes_linux_ppc64.go
@@ -574,9 +574,10 @@ type Ustat_t struct {
}
type EpollEvent struct {
- Events uint32
- Fd int32
- Pad int32
+ Events uint32
+ X_padFd int32
+ Fd int32
+ Pad int32
}
const (
diff --git a/src/syscall/ztypes_linux_ppc64le.go b/src/syscall/ztypes_linux_ppc64le.go
index 27ca004834..a1180553ec 100644
--- a/src/syscall/ztypes_linux_ppc64le.go
+++ b/src/syscall/ztypes_linux_ppc64le.go
@@ -574,9 +574,10 @@ type Ustat_t struct {
}
type EpollEvent struct {
- Events uint32
- Fd int32
- Pad int32
+ Events uint32
+ X_padFd int32
+ Fd int32
+ Pad int32
}
const (