From 15937ccb8915ef941e08feb2500f5acf61bd5427 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 6 Oct 2016 15:14:58 -0700 Subject: [PATCH] runtime: fix sigset type for ppc64 big-endian GNU/Linux On 64-bit big-endian GNU/Linux machines we need to treat sigset as a single uint64, not as a pair of uint32 values. This fix was already made for s390x, but not for ppc64 (which is big-endian--the little endian version is known as ppc64le). So copy os_linux_390.x to os_linux_be64.go, and use build constraints as needed. Fixes #17361 Change-Id: Ia0eb18221a8f5056bf17675fcfeb010407a13fb0 Reviewed-on: https://go-review.googlesource.com/30602 Run-TryBot: Ian Lance Taylor Reviewed-by: Brad Fitzpatrick --- src/runtime/{os_linux_s390x.go => os_linux_be64.go} | 4 ++++ src/runtime/os_linux_generic.go | 1 + 2 files changed, 5 insertions(+) rename src/runtime/{os_linux_s390x.go => os_linux_be64.go} (89%) diff --git a/src/runtime/os_linux_s390x.go b/src/runtime/os_linux_be64.go similarity index 89% rename from src/runtime/os_linux_s390x.go rename to src/runtime/os_linux_be64.go index bdda2a3a6e..e66dcac2ad 100644 --- a/src/runtime/os_linux_s390x.go +++ b/src/runtime/os_linux_be64.go @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// The standard GNU/Linux sigset type on big-endian 64-bit machines. + +// +build ppc64 s390x + package runtime const ( diff --git a/src/runtime/os_linux_generic.go b/src/runtime/os_linux_generic.go index 94e5ed996f..43d0093c31 100644 --- a/src/runtime/os_linux_generic.go +++ b/src/runtime/os_linux_generic.go @@ -5,6 +5,7 @@ // +build !mips64 // +build !mips64le // +build !s390x +// +build !ppc64 // +build linux package runtime