mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-06 07:37:38 +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.
|
// List is a list of Ports.
|
||||||
type List []Port
|
type List []Port
|
||||||
|
|
||||||
var protos = []string{"tcp", "udp"}
|
|
||||||
|
|
||||||
func (a *Port) lessThan(b *Port) bool {
|
func (a *Port) lessThan(b *Port) bool {
|
||||||
if a.Port < b.Port {
|
if a.Port < b.Port {
|
||||||
return true
|
return true
|
||||||
|
@ -24,6 +24,7 @@ const pollInterval = 1 * time.Second
|
|||||||
// TODO(apenwarr): Include IPv6 ports eventually.
|
// TODO(apenwarr): Include IPv6 ports eventually.
|
||||||
// Right now we don't route IPv6 anyway so it's better to exclude them.
|
// 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 sockfiles = []string{"/proc/net/tcp", "/proc/net/udp"}
|
||||||
|
var protos = []string{"tcp", "udp"}
|
||||||
|
|
||||||
func listPorts() (List, error) {
|
func listPorts() (List, error) {
|
||||||
l := []Port{}
|
l := []Port{}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user