From d23e3cca238dcb8b48725a13f7bdfe78b36dbe59 Mon Sep 17 00:00:00 2001 From: Lucas Manning Date: Tue, 30 May 2023 18:03:35 -0700 Subject: [PATCH] Remove dependency on linux packages in netstack. PiperOrigin-RevId: 536560224 --- pkg/context/BUILD | 2 -- pkg/context/context.go | 5 ++--- pkg/tcpip/BUILD | 2 -- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/pkg/context/BUILD b/pkg/context/BUILD index d38182689..e6f52309e 100644 --- a/pkg/context/BUILD +++ b/pkg/context/BUILD @@ -12,8 +12,6 @@ go_library( ], visibility = ["//:sandbox"], deps = [ - "//pkg/abi/linux/errno", - "//pkg/errors", "//pkg/log", "//pkg/waiter", ], diff --git a/pkg/context/context.go b/pkg/context/context.go index 14776d7aa..7f94da247 100644 --- a/pkg/context/context.go +++ b/pkg/context/context.go @@ -24,11 +24,10 @@ package context import ( "context" + "errors" "sync" "time" - "gvisor.dev/gvisor/pkg/abi/linux/errno" - "gvisor.dev/gvisor/pkg/errors" "gvisor.dev/gvisor/pkg/log" "gvisor.dev/gvisor/pkg/waiter" ) @@ -102,7 +101,7 @@ func (nt *NoTask) Block(C <-chan struct{}) error { } select { case <-nt.cancel: - return errors.New(errno.EINTR, "interrupted system call") // Interrupted. + return errors.New("interrupted system call") // Interrupted. case <-C: return nil } diff --git a/pkg/tcpip/BUILD b/pkg/tcpip/BUILD index 74a848eab..501d98c8c 100644 --- a/pkg/tcpip/BUILD +++ b/pkg/tcpip/BUILD @@ -70,8 +70,6 @@ deps_test( "//pkg/sync/locking", "//pkg/waiter", "//pkg/xdp", - "//pkg/abi/linux/errno", - "//pkg/errors", # Other deps. "@com_github_google_btree//:go_default_library",