mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 14:57:49 +00:00
Fix macOS build
staticcheck used to fail on macOS (and presumably windows) due to a variable declared in a common package that was only used by the Linux build, which would prevent `redo pr` from passing on Mac. Moved variable declaration from the common file to the Linux-specific one to resolve the compiler complaint. Signed-off-by: Wendi Yu <wendi.yu@yahoo.ca>
This commit is contained in:
parent
e16f7e48a3
commit
fde384b359
@ -21,8 +21,6 @@ type Port struct {
|
||||
// List is a list of Ports.
|
||||
type List []Port
|
||||
|
||||
var protos = []string{"tcp", "udp"}
|
||||
|
||||
func (a *Port) lessThan(b *Port) bool {
|
||||
if a.Port < b.Port {
|
||||
return true
|
||||
|
@ -24,6 +24,7 @@
|
||||
// TODO(apenwarr): Include IPv6 ports eventually.
|
||||
// Right now we don't route IPv6 anyway so it's better to exclude them.
|
||||
var sockfiles = []string{"/proc/net/tcp", "/proc/net/udp"}
|
||||
var protos = []string{"tcp", "udp"}
|
||||
|
||||
func listPorts() (List, error) {
|
||||
l := []Port{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user