From 202a3401e7f83a2f809fefaa8231d79e0e97edae Mon Sep 17 00:00:00 2001 From: Andrea Barisani Date: Wed, 30 Aug 2023 14:05:01 +0200 Subject: [PATCH] adjust build tags for tamago --- conn/controlfns_unix.go | 2 +- ipc/uapi_tamago.go | 17 +++++++++++++++++ rwcancel/rwcancel.go | 2 +- rwcancel/rwcancel_stub.go | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 ipc/uapi_tamago.go diff --git a/conn/controlfns_unix.go b/conn/controlfns_unix.go index 5cc4d98..144a880 100644 --- a/conn/controlfns_unix.go +++ b/conn/controlfns_unix.go @@ -1,4 +1,4 @@ -//go:build !windows && !linux && !wasm && !plan9 +//go:build !windows && !linux && !wasm && !plan9 && !tamago /* SPDX-License-Identifier: MIT * diff --git a/ipc/uapi_tamago.go b/ipc/uapi_tamago.go new file mode 100644 index 0000000..85a725a --- /dev/null +++ b/ipc/uapi_tamago.go @@ -0,0 +1,17 @@ +//go:build tamago + +/* SPDX-License-Identifier: MIT + * + * Copyright (C) 2017-2023 WireGuard LLC. All Rights Reserved. + */ + +package ipc + +// Made up sentinel error codes for tamago platform. +const ( + IpcErrorIO = 1 + IpcErrorInvalid = 2 + IpcErrorPortInUse = 3 + IpcErrorUnknown = 4 + IpcErrorProtocol = 5 +) diff --git a/rwcancel/rwcancel.go b/rwcancel/rwcancel.go index dd649d4..ceb87e4 100644 --- a/rwcancel/rwcancel.go +++ b/rwcancel/rwcancel.go @@ -1,4 +1,4 @@ -//go:build !windows && !wasm && !plan9 +//go:build !windows && !wasm && !plan9 && !tamago /* SPDX-License-Identifier: MIT * diff --git a/rwcancel/rwcancel_stub.go b/rwcancel/rwcancel_stub.go index 4623801..60ae9af 100644 --- a/rwcancel/rwcancel_stub.go +++ b/rwcancel/rwcancel_stub.go @@ -1,4 +1,4 @@ -//go:build windows || wasm || plan9 +//go:build windows || wasm || plan9 || tamago // SPDX-License-Identifier: MIT