From d2b48375709b96fb2e353aeb393b48bea271ea80 Mon Sep 17 00:00:00 2001 From: Kevin Krakauer Date: Wed, 19 Apr 2023 14:58:31 -0700 Subject: [PATCH] fix nogo error Avoids messages like: error checking types: pkg/sync/runtime_unsafe.go:105:21: predeclared any requires go1.18 or later PiperOrigin-RevId: 525559255 --- pkg/sentry/platform/kvm/bluepill_unsafe.go | 4 ++-- pkg/sentry/platform/kvm/machine_unsafe.go | 4 ++-- pkg/sentry/platform/ptrace/subprocess_unsafe.go | 4 ++-- pkg/sentry/platform/systrap/subprocess_unsafe.go | 4 ++-- pkg/sync/runtime_unsafe.go | 4 ++-- pkg/tcpip/link/rawfile/blockingpoll_yield_unsafe.go | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkg/sentry/platform/kvm/bluepill_unsafe.go b/pkg/sentry/platform/kvm/bluepill_unsafe.go index 853b5789d..81bd9f814 100644 --- a/pkg/sentry/platform/kvm/bluepill_unsafe.go +++ b/pkg/sentry/platform/kvm/bluepill_unsafe.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.12 -// +build go1.12 +//go:build go1.18 +// +build go1.18 // //go:linkname directives type-checked by checklinkname. Any other // non-linkname assumptions outside the Go 1 compatibility guarantee should diff --git a/pkg/sentry/platform/kvm/machine_unsafe.go b/pkg/sentry/platform/kvm/machine_unsafe.go index 28d1566ab..b20a988a0 100644 --- a/pkg/sentry/platform/kvm/machine_unsafe.go +++ b/pkg/sentry/platform/kvm/machine_unsafe.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.12 -// +build go1.12 +//go:build go1.18 +// +build go1.18 // //go:linkname directives type-checked by checklinkname. Any other // non-linkname assumptions outside the Go 1 compatibility guarantee should diff --git a/pkg/sentry/platform/ptrace/subprocess_unsafe.go b/pkg/sentry/platform/ptrace/subprocess_unsafe.go index 304722200..3a0f3d4d8 100644 --- a/pkg/sentry/platform/ptrace/subprocess_unsafe.go +++ b/pkg/sentry/platform/ptrace/subprocess_unsafe.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.12 -// +build go1.12 +//go:build go1.18 +// +build go1.18 // //go:linkname directives type-checked by checklinkname. Any other // non-linkname assumptions outside the Go 1 compatibility guarantee should diff --git a/pkg/sentry/platform/systrap/subprocess_unsafe.go b/pkg/sentry/platform/systrap/subprocess_unsafe.go index 3f7a3d44e..c724ad9d8 100644 --- a/pkg/sentry/platform/systrap/subprocess_unsafe.go +++ b/pkg/sentry/platform/systrap/subprocess_unsafe.go @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build go1.12 -// +build go1.12 +//go:build go1.18 +// +build go1.18 // //go:linkname directives type-checked by checklinkname. Any other // non-linkname assumptions outside the Go 1 compatibility guarantee should diff --git a/pkg/sync/runtime_unsafe.go b/pkg/sync/runtime_unsafe.go index cfccde758..91cda67bb 100644 --- a/pkg/sync/runtime_unsafe.go +++ b/pkg/sync/runtime_unsafe.go @@ -3,8 +3,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build go1.13 && !go1.22 -// +build go1.13,!go1.22 +//go:build go1.18 && !go1.22 +// +build go1.18,!go1.22 // //go:linkname directives type-checked by checklinkname. Any other // non-linkname assumptions outside the Go 1 compatibility guarantee should diff --git a/pkg/tcpip/link/rawfile/blockingpoll_yield_unsafe.go b/pkg/tcpip/link/rawfile/blockingpoll_yield_unsafe.go index 0b7b9e3de..9662411c5 100644 --- a/pkg/tcpip/link/rawfile/blockingpoll_yield_unsafe.go +++ b/pkg/tcpip/link/rawfile/blockingpoll_yield_unsafe.go @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build ((linux && amd64) || (linux && arm64)) && go1.12 +//go:build ((linux && amd64) || (linux && arm64)) && go1.18 // +build linux,amd64 linux,arm64 -// +build go1.12 +// +build go1.18 // //go:linkname directives type-checked by checklinkname. Any other // non-linkname assumptions outside the Go 1 compatibility guarantee should @@ -37,7 +37,7 @@ import ( //go:noescape func BlockingPoll(fds *PollEvent, nfds int, timeout *unix.Timespec) (int, unix.Errno) -// Use go:linkname to call into the runtime. As of Go 1.12 this has to +// Use go:linkname to call into the runtime. As of Go 1.13 this has to // be done from Go code so that we make an ABIInternal call to an // ABIInternal function; see https://golang.org/issue/27539.