diff options
author | Clément Chigot <chigot.c@gmail.com> | 2020-05-26 11:31:37 +0200 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-09-22 17:29:52 -0700 |
commit | 63cd53d2f5da07856340bbea11ee09ab1125e8c0 (patch) | |
tree | fe31f55256655defed5054c94da8dc5ef81e9aa2 /libgo/go | |
parent | e41e66b78d4e0ba4f7e0b2423abf68d359a84fdd (diff) | |
download | gcc-63cd53d2f5da07856340bbea11ee09ab1125e8c0.zip gcc-63cd53d2f5da07856340bbea11ee09ab1125e8c0.tar.gz gcc-63cd53d2f5da07856340bbea11ee09ab1125e8c0.tar.bz2 |
runtime, net: fix build errors on AIX
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/235158
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/internal/cpu/cpu_no_init.go | 1 | ||||
-rw-r--r-- | libgo/go/internal/cpu/cpu_ppcx.go (renamed from libgo/go/internal/cpu/cpu_ppc64x.go) | 2 | ||||
-rw-r--r-- | libgo/go/net/interface_aix.go | 2 | ||||
-rw-r--r-- | libgo/go/runtime/os_aix.go | 11 |
4 files changed, 7 insertions, 9 deletions
diff --git a/libgo/go/internal/cpu/cpu_no_init.go b/libgo/go/internal/cpu/cpu_no_init.go index fb381e1..e7ff873 100644 --- a/libgo/go/internal/cpu/cpu_no_init.go +++ b/libgo/go/internal/cpu/cpu_no_init.go @@ -6,6 +6,7 @@ // +build !amd64 // +build !arm // +build !arm64 +// +build !ppc // +build !ppc64 // +build !ppc64le // +build !s390x diff --git a/libgo/go/internal/cpu/cpu_ppc64x.go b/libgo/go/internal/cpu/cpu_ppcx.go index b726cc8..56ff875 100644 --- a/libgo/go/internal/cpu/cpu_ppc64x.go +++ b/libgo/go/internal/cpu/cpu_ppcx.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build ppc64 ppc64le +// +build ppc ppc64 ppc64le package cpu diff --git a/libgo/go/net/interface_aix.go b/libgo/go/net/interface_aix.go index f57c5ff..bd55386 100644 --- a/libgo/go/net/interface_aix.go +++ b/libgo/go/net/interface_aix.go @@ -33,8 +33,6 @@ const _RTAX_NETMASK = 2 const _RTAX_IFA = 5 const _RTAX_MAX = 8 -const _SIOCGIFMTU = -0x3fd796aa - func getIfList() ([]byte, error) { needed, err := syscall.Getkerninfo(_KINFO_RT_IFLIST, 0, 0, 0) if err != nil { diff --git a/libgo/go/runtime/os_aix.go b/libgo/go/runtime/os_aix.go index b337330..951aeb6 100644 --- a/libgo/go/runtime/os_aix.go +++ b/libgo/go/runtime/os_aix.go @@ -46,7 +46,7 @@ func clock_gettime(clock_id int64, timeout *timespec) int32 //go:nosplit func semacreate(mp *m) { - if mp.mos.waitsema != 0 { + if mp.waitsema != 0 { return } @@ -59,7 +59,7 @@ func semacreate(mp *m) { if sem_init(sem, 0, 0) != 0 { throw("sem_init") } - mp.mos.waitsema = uintptr(unsafe.Pointer(sem)) + mp.waitsema = uintptr(unsafe.Pointer(sem)) } //go:nosplit @@ -85,7 +85,7 @@ func semasleep(ns int64) int32 { ts.tv_sec = timespec_sec_t(sec) ts.tv_nsec = timespec_nsec_t(nsec) - if sem_timedwait((*semt)(unsafe.Pointer(_m_.mos.waitsema)), &ts) != 0 { + if sem_timedwait((*semt)(unsafe.Pointer(_m_.waitsema)), &ts) != 0 { err := errno() if err == _ETIMEDOUT || err == _EAGAIN || err == _EINTR { return -1 @@ -96,7 +96,7 @@ func semasleep(ns int64) int32 { return 0 } for { - r1 := sem_wait((*semt)(unsafe.Pointer(_m_.mos.waitsema))) + r1 := sem_wait((*semt)(unsafe.Pointer(_m_.waitsema))) if r1 == 0 { break } @@ -110,7 +110,7 @@ func semasleep(ns int64) int32 { //go:nosplit func semawakeup(mp *m) { - if sem_post((*semt)(unsafe.Pointer(mp.mos.waitsema))) != 0 { + if sem_post((*semt)(unsafe.Pointer(mp.waitsema))) != 0 { throw("sem_post") } } @@ -128,7 +128,6 @@ const ( const ( // getsystemcfg constants - _SC_IMPL = 2 _IMPL_POWER8 = 0x10000 _IMPL_POWER9 = 0x20000 ) |