aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipc/uapi_js.go15
-rw-r--r--rwcancel/rwcancel.go2
-rw-r--r--rwcancel/rwcancel_stub.go (renamed from rwcancel/rwcancel_windows.go)2
3 files changed, 18 insertions, 1 deletions
diff --git a/ipc/uapi_js.go b/ipc/uapi_js.go
new file mode 100644
index 0000000..be36b5d
--- /dev/null
+++ b/ipc/uapi_js.go
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: MIT
+ *
+ * Copyright (C) 2021 WireGuard LLC. All Rights Reserved.
+ */
+
+package ipc
+
+// Made up sentinel error codes for the js/wasm platform.
+const (
+ IpcErrorIO = 1
+ IpcErrorInvalid = 2
+ IpcErrorPortInUse = 3
+ IpcErrorUnknown = 4
+ IpcErrorProtocol = 5
+)
diff --git a/rwcancel/rwcancel.go b/rwcancel/rwcancel.go
index 59bbe57..c3b2299 100644
--- a/rwcancel/rwcancel.go
+++ b/rwcancel/rwcancel.go
@@ -1,4 +1,4 @@
-//go:build !windows
+//go:build !windows && !js
/* SPDX-License-Identifier: MIT
*
diff --git a/rwcancel/rwcancel_windows.go b/rwcancel/rwcancel_stub.go
index 0316911..fae47b4 100644
--- a/rwcancel/rwcancel_windows.go
+++ b/rwcancel/rwcancel_stub.go
@@ -1,3 +1,5 @@
+//go:build windows || js
+
// SPDX-License-Identifier: MIT
package rwcancel