aboutsummaryrefslogtreecommitdiff
path: root/src/vendor
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2023-04-12 00:28:06 +0200
committerGopher Robot <gobot@golang.org>2023-04-11 22:42:18 +0000
commitbc5b194813d1a59daec29bd81f6bc092948a2f0a (patch)
tree290a86850c84c177ddb4ad41a99f271a77202a1a /src/vendor
parent1635205a72d26721af54f01ccbab8e0b51ded3a9 (diff)
downloadgo-bc5b194813d1a59daec29bd81f6bc092948a2f0a.tar.gz
go-bc5b194813d1a59daec29bd81f6bc092948a2f0a.zip
all: update vendored golang.org/x/net
Pull in CL 483375. This also updates golang.org/x/sys to v0.7.0 and thus we also need to update it to that version in cmd to keep TestDependencyVersionsConsistent happy. Fixes #22927 Change-Id: Ice14cd66a5c2a621b373c3d29455c75494436045 Reviewed-on: https://go-review.googlesource.com/c/go/+/483595 Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Benny Siegert <bsiegert@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/vendor')
-rw-r--r--src/vendor/golang.org/x/net/nettest/nettest.go6
-rw-r--r--src/vendor/golang.org/x/sys/cpu/hwcap_linux.go15
-rw-r--r--src/vendor/golang.org/x/sys/cpu/runtime_auxv.go16
-rw-r--r--src/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go19
-rw-r--r--src/vendor/modules.txt6
5 files changed, 53 insertions, 9 deletions
diff --git a/src/vendor/golang.org/x/net/nettest/nettest.go b/src/vendor/golang.org/x/net/nettest/nettest.go
index 510555ac28..1e350f09cb 100644
--- a/src/vendor/golang.org/x/net/nettest/nettest.go
+++ b/src/vendor/golang.org/x/net/nettest/nettest.go
@@ -126,12 +126,6 @@ func TestableNetwork(network string) bool {
switch runtime.GOOS {
case "aix", "android", "fuchsia", "hurd", "darwin", "ios", "js", "nacl", "plan9", "windows", "zos":
return false
- case "netbsd":
- // It passes on amd64 at least. 386 fails
- // (Issue 22927). arm is unknown.
- if runtime.GOARCH == "386" {
- return false
- }
}
}
switch ss[0] {
diff --git a/src/vendor/golang.org/x/sys/cpu/hwcap_linux.go b/src/vendor/golang.org/x/sys/cpu/hwcap_linux.go
index f3baa37932..1d9d91f3ed 100644
--- a/src/vendor/golang.org/x/sys/cpu/hwcap_linux.go
+++ b/src/vendor/golang.org/x/sys/cpu/hwcap_linux.go
@@ -24,6 +24,21 @@ var hwCap uint
var hwCap2 uint
func readHWCAP() error {
+ // For Go 1.21+, get auxv from the Go runtime.
+ if a := getAuxv(); len(a) > 0 {
+ for len(a) >= 2 {
+ tag, val := a[0], uint(a[1])
+ a = a[2:]
+ switch tag {
+ case _AT_HWCAP:
+ hwCap = val
+ case _AT_HWCAP2:
+ hwCap2 = val
+ }
+ }
+ return nil
+ }
+
buf, err := ioutil.ReadFile(procAuxv)
if err != nil {
// e.g. on android /proc/self/auxv is not accessible, so silently
diff --git a/src/vendor/golang.org/x/sys/cpu/runtime_auxv.go b/src/vendor/golang.org/x/sys/cpu/runtime_auxv.go
new file mode 100644
index 0000000000..5f92ac9a2e
--- /dev/null
+++ b/src/vendor/golang.org/x/sys/cpu/runtime_auxv.go
@@ -0,0 +1,16 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package cpu
+
+// getAuxvFn is non-nil on Go 1.21+ (via runtime_auxv_go121.go init)
+// on platforms that use auxv.
+var getAuxvFn func() []uintptr
+
+func getAuxv() []uintptr {
+ if getAuxvFn == nil {
+ return nil
+ }
+ return getAuxvFn()
+}
diff --git a/src/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go b/src/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
new file mode 100644
index 0000000000..b975ea2a04
--- /dev/null
+++ b/src/vendor/golang.org/x/sys/cpu/runtime_auxv_go121.go
@@ -0,0 +1,19 @@
+// Copyright 2023 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build go1.21
+// +build go1.21
+
+package cpu
+
+import (
+ _ "unsafe" // for linkname
+)
+
+//go:linkname runtime_getAuxv runtime.getAuxv
+func runtime_getAuxv() []uintptr
+
+func init() {
+ getAuxvFn = runtime_getAuxv
+}
diff --git a/src/vendor/modules.txt b/src/vendor/modules.txt
index d555d326b1..438c2f447b 100644
--- a/src/vendor/modules.txt
+++ b/src/vendor/modules.txt
@@ -7,7 +7,7 @@ golang.org/x/crypto/cryptobyte/asn1
golang.org/x/crypto/hkdf
golang.org/x/crypto/internal/alias
golang.org/x/crypto/internal/poly1305
-# golang.org/x/net v0.7.0
+# golang.org/x/net v0.9.1-0.20230410173003-9001ca7de9d7
## explicit; go 1.17
golang.org/x/net/dns/dnsmessage
golang.org/x/net/http/httpguts
@@ -17,10 +17,10 @@ golang.org/x/net/idna
golang.org/x/net/lif
golang.org/x/net/nettest
golang.org/x/net/route
-# golang.org/x/sys v0.5.1-0.20230208141308-4fee21c92339
+# golang.org/x/sys v0.7.0
## explicit; go 1.17
golang.org/x/sys/cpu
-# golang.org/x/text v0.7.1-0.20230207171107-30dadde3188b
+# golang.org/x/text v0.9.0
## explicit; go 1.17
golang.org/x/text/secure/bidirule
golang.org/x/text/transform