]> Cypherpunks repositories - gostls13.git/commitdiff
syscall: fix epoll_event struct for ppc64le/ppc64
authorLynn Boger <laboger@linux.vnet.ibm.com>
Wed, 6 Apr 2016 16:07:12 +0000 (11:07 -0500)
committerIan Lance Taylor <iant@golang.org>
Wed, 13 Apr 2016 20:58:46 +0000 (20:58 +0000)
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

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>

src/syscall/types_linux.go
src/syscall/ztypes_linux_ppc64.go
src/syscall/ztypes_linux_ppc64le.go

index 9bccfcabd861011c177ce7af35253bfd120570f1..28d0225cbf3000855d65806ad121eb35c5e6456c 100644 (file)
@@ -116,6 +116,9 @@ 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;
+#endif
+#ifdef  __powerpc64__
+       int32_t _padFd;
 #endif
        int32_t fd;
        int32_t pad;
index 33d1b7f3e52153871481edcef926efc7eb90f104..915ca95190e8be87685cd3c379eb7151413da072 100644 (file)
@@ -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 (
index 27ca00483469015157c87125f93fc9569081b294..a1180553ec6f38aaa5be3b09066ba8cd756b3da6 100644 (file)
@@ -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 (