From 6e755e132ac18b44625baae0b7ea7ced572d7ff5 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sun, 11 Jun 2023 16:10:38 -0700 Subject: all: adjust build tags for wasip1/wasm Signed-off-by: Brad Fitzpatrick Signed-off-by: Jason A. Donenfeld --- conn/controlfns_unix.go | 2 +- ipc/uapi_js.go | 15 --------------- ipc/uapi_wasm.go | 15 +++++++++++++++ rwcancel/rwcancel.go | 2 +- rwcancel/rwcancel_stub.go | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 ipc/uapi_js.go create mode 100644 ipc/uapi_wasm.go diff --git a/conn/controlfns_unix.go b/conn/controlfns_unix.go index c4536d4..91692c0 100644 --- a/conn/controlfns_unix.go +++ b/conn/controlfns_unix.go @@ -1,4 +1,4 @@ -//go:build !windows && !linux && !js +//go:build !windows && !linux && !wasm /* SPDX-License-Identifier: MIT * diff --git a/ipc/uapi_js.go b/ipc/uapi_js.go deleted file mode 100644 index 2570515..0000000 --- a/ipc/uapi_js.go +++ /dev/null @@ -1,15 +0,0 @@ -/* SPDX-License-Identifier: MIT - * - * Copyright (C) 2017-2023 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/ipc/uapi_wasm.go b/ipc/uapi_wasm.go new file mode 100644 index 0000000..fa84684 --- /dev/null +++ b/ipc/uapi_wasm.go @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: MIT + * + * Copyright (C) 2017-2023 WireGuard LLC. All Rights Reserved. + */ + +package ipc + +// Made up sentinel error codes for {js,wasip1}/wasm. +const ( + IpcErrorIO = 1 + IpcErrorInvalid = 2 + IpcErrorPortInUse = 3 + IpcErrorUnknown = 4 + IpcErrorProtocol = 5 +) diff --git a/rwcancel/rwcancel.go b/rwcancel/rwcancel.go index 63e1510..e397c0e 100644 --- a/rwcancel/rwcancel.go +++ b/rwcancel/rwcancel.go @@ -1,4 +1,4 @@ -//go:build !windows && !js +//go:build !windows && !wasm /* SPDX-License-Identifier: MIT * diff --git a/rwcancel/rwcancel_stub.go b/rwcancel/rwcancel_stub.go index 182940b..2a98b2b 100644 --- a/rwcancel/rwcancel_stub.go +++ b/rwcancel/rwcancel_stub.go @@ -1,4 +1,4 @@ -//go:build windows || js +//go:build windows || wasm // SPDX-License-Identifier: MIT -- cgit v1.2.3