all: fix some js/wasm compilation issues

Change-Id: I05a3a4835e225a1e413ec3540a7c7e4a2d477084
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/3158/head
Brad Fitzpatrick 4 years ago committed by Brad Fitzpatrick
parent 0bf515e780
commit 9310713bfb

@ -0,0 +1,9 @@
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package paths
func ensureStateDirPerms(dirPath string) error {
return nil
}

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build !windows //go:build !windows && !js
// +build !windows // +build !windows,!js
package paths package paths

@ -0,0 +1,17 @@
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package portlist
import "time"
const pollInterval = 365 * 24 * time.Hour
func listPorts() (List, error) {
return nil, nil
}
func addProcesses(pl []Port) ([]Port, error) {
return pl, nil
}

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build !linux && !windows && !darwin //go:build !linux && !windows && !darwin && !js
// +build !linux,!windows,!darwin // +build !linux,!windows,!darwin,!js
package portlist package portlist

@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build windows || js
// +build windows js
package logger package logger
func rusageMaxRSS() float64 { func rusageMaxRSS() float64 {

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
//go:build !windows //go:build !windows && !js
// +build !windows // +build !windows,!js
package logger package logger

@ -16,8 +16,8 @@ import (
"tailscale.com/wgengine/monitor" "tailscale.com/wgengine/monitor"
) )
func newUserspaceRouter(logf logger.Logf, tunname string, tunDev tun.Device, linkMon *monitor.Mon) Router { func newUserspaceRouter(logf logger.Logf, tunDev tun.Device, linkMon *monitor.Mon) (Router, error) {
panic(fmt.Sprintf("unsupported OS %q", runtime.GOOS)) return nil, fmt.Errorf("unsupported OS %q", runtime.GOOS)
} }
func cleanup(logf logger.Logf, interfaceName string) { func cleanup(logf logger.Logf, interfaceName string) {

Loading…
Cancel
Save