summaryrefslogtreecommitdiffhomepage
path: root/pkg/safemem
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/safemem')
-rw-r--r--pkg/safemem/BUILD1
-rw-r--r--pkg/safemem/seq_unsafe.go10
2 files changed, 6 insertions, 5 deletions
diff --git a/pkg/safemem/BUILD b/pkg/safemem/BUILD
index d3b9b0ca9..3fda3a9cc 100644
--- a/pkg/safemem/BUILD
+++ b/pkg/safemem/BUILD
@@ -14,6 +14,7 @@ go_library(
deps = [
"//pkg/gohacks",
"//pkg/safecopy",
+ "@org_golang_x_sys//unix:go_default_library",
],
)
diff --git a/pkg/safemem/seq_unsafe.go b/pkg/safemem/seq_unsafe.go
index b315b0e5a..bbf8740a5 100644
--- a/pkg/safemem/seq_unsafe.go
+++ b/pkg/safemem/seq_unsafe.go
@@ -17,9 +17,9 @@ package safemem
import (
"bytes"
"fmt"
- "syscall"
"unsafe"
+ "golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/gohacks"
)
@@ -304,12 +304,12 @@ func ZeroSeq(dsts BlockSeq) (uint64, error) {
return done, nil
}
-// IovecsFromBlockSeq returns a []syscall.Iovec representing seq.
-func IovecsFromBlockSeq(bs BlockSeq) []syscall.Iovec {
- iovs := make([]syscall.Iovec, 0, bs.NumBlocks())
+// IovecsFromBlockSeq returns a []unix.Iovec representing seq.
+func IovecsFromBlockSeq(bs BlockSeq) []unix.Iovec {
+ iovs := make([]unix.Iovec, 0, bs.NumBlocks())
for ; !bs.IsEmpty(); bs = bs.Tail() {
b := bs.Head()
- iovs = append(iovs, syscall.Iovec{
+ iovs = append(iovs, unix.Iovec{
Base: &b.ToSlice()[0],
Len: uint64(b.Len()),
})