From 17bc6164aac4cb0a31185672304df091fd0a42cc Mon Sep 17 00:00:00 2001 From: Gernot Vormayr Date: Sat, 15 Jun 2019 22:13:49 +0200 Subject: [PATCH] unix: remove net dependency According to godoc x/sys/unix is supposed to be a base for packages 'such as "os", "time" and "net"'[1]. If we ever plan to make net a dependency on x/sys/unix, this would lead to a circular dependency. [1] https://godoc.org/golang.org/x/sys/unix Change-Id: I3e2a62674148afd7e4f6db6acc3a364684b31379 Reviewed-on: https://go-review.googlesource.com/c/sys/+/182320 Reviewed-by: Tobias Klauser Reviewed-by: Ian Lance Taylor Run-TryBot: Tobias Klauser TryBot-Result: Gobot Gobot --- unix/syscall_linux.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/unix/syscall_linux.go b/unix/syscall_linux.go index c92545ea..f5c1b880 100644 --- a/unix/syscall_linux.go +++ b/unix/syscall_linux.go @@ -13,7 +13,6 @@ package unix import ( "encoding/binary" - "net" "runtime" "syscall" "unsafe" @@ -765,7 +764,7 @@ const px_proto_oe = 0 type SockaddrPPPoE struct { SID uint16 - Remote net.HardwareAddr + Remote []byte Dev string raw RawSockaddrPPPoX } @@ -916,7 +915,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) { } sa := &SockaddrPPPoE{ SID: binary.BigEndian.Uint16(pp[6:8]), - Remote: net.HardwareAddr(pp[8:14]), + Remote: pp[8:14], } for i := 14; i < 14+IFNAMSIZ; i++ { if pp[i] == 0 {