diff options
Diffstat (limited to 'pkg/tcpip/link/muxed')
-rw-r--r-- | pkg/tcpip/link/muxed/BUILD | 1 | ||||
-rw-r--r-- | pkg/tcpip/link/muxed/injectable_test.go | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/pkg/tcpip/link/muxed/BUILD b/pkg/tcpip/link/muxed/BUILD index cbda59775..193524525 100644 --- a/pkg/tcpip/link/muxed/BUILD +++ b/pkg/tcpip/link/muxed/BUILD @@ -24,5 +24,6 @@ go_test( "//pkg/tcpip/link/fdbased", "//pkg/tcpip/network/ipv4", "//pkg/tcpip/stack", + "@org_golang_x_sys//unix:go_default_library", ], ) diff --git a/pkg/tcpip/link/muxed/injectable_test.go b/pkg/tcpip/link/muxed/injectable_test.go index ba30287bc..5806f7fdf 100644 --- a/pkg/tcpip/link/muxed/injectable_test.go +++ b/pkg/tcpip/link/muxed/injectable_test.go @@ -18,9 +18,9 @@ import ( "bytes" "net" "os" - "syscall" "testing" + "golang.org/x/sys/unix" "gvisor.dev/gvisor/pkg/tcpip" "gvisor.dev/gvisor/pkg/tcpip/buffer" "gvisor.dev/gvisor/pkg/tcpip/link/fdbased" @@ -89,8 +89,8 @@ func TestInjectableEndpointDispatchHdrOnly(t *testing.T) { func makeTestInjectableEndpoint(t *testing.T) (*InjectableEndpoint, *os.File, tcpip.Address) { dstIP := tcpip.Address(net.ParseIP("1.2.3.4").To4()) - pair, err := syscall.Socketpair(syscall.AF_UNIX, - syscall.SOCK_SEQPACKET|syscall.SOCK_CLOEXEC|syscall.SOCK_NONBLOCK, 0) + pair, err := unix.Socketpair(unix.AF_UNIX, + unix.SOCK_SEQPACKET|unix.SOCK_CLOEXEC|unix.SOCK_NONBLOCK, 0) if err != nil { t.Fatal("Failed to create socket pair:", err) } |